Skip to content
Open

Doc #13

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
230 changes: 115 additions & 115 deletions 3D/Rb3DSpace.xojo_code
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Protected Class Rb3DSpace
'next
'next
'//find centroid and angle for each vertex and sort by angle
'//MsgBox "count="+str(count)
'//MessageBox "count="+str(count)
'maxrad=0
'for i=0 to ncurve-1
'temp1=0
Expand Down Expand Up @@ -303,7 +303,7 @@ Protected Class Rb3DSpace
'//interpolation corresponding radius for ang0
'rad0=(ang0-ang2)/(ang1-ang2)
'if rad0<0 then
'//MsgBox ("problem doiing the interpolation...")
'//MessageBox ("problem doiing the interpolation...")
'exit
'end if
'New_Y_vertices(j+i*Ncpoints)=y_2+rad0*(y_1-y_2)
Expand Down Expand Up @@ -354,7 +354,7 @@ Protected Class Rb3DSpace
'next
'//----------
'//starting triangulation...
'//MsgBox ("starting triangulation")
'//MessageBox ("starting triangulation")
'//============
'count=0
'for i=0 to ncurve-2
Expand Down Expand Up @@ -423,7 +423,7 @@ Protected Class Rb3DSpace
'count=count+2
'next
'next
'//MsgBox "created "+str(count)+ " triangles"
'//MessageBox "created "+str(count)+ " triangles"
'/// now triangulate the ends of the surface
'//calculate centroid*/
'X_cent=0
Expand Down Expand Up @@ -475,7 +475,7 @@ Protected Class Rb3DSpace
'next
'//============================================= have to get here!!!!!!!!!!!!!!!!!!!!!
'
'//MsgBox "there are now "+str(count)+ " triangles"
'//MessageBox "there are now "+str(count)+ " triangles"
'//printf("there are now %d triangles\n",count);
'
'//write triangle data to roi file
Expand Down Expand Up @@ -612,7 +612,7 @@ Protected Class Rb3DSpace
'next
'next
'next
'MsgBox "test"
'MessageBox "test"

End Sub
#tag EndMethod
Expand Down Expand Up @@ -757,147 +757,147 @@ Protected Class Rb3DSpace
'//check left
'if tmpsurf.Pixel(ii-1,jj).red<>255 then //means this current pixel is black but on the left it is white then close left
'///------------------
'allx.Append (centerx-pixdx)
'ally.Append (centery-pixdy)
'allz.Append z1
'allx.Append (centerx-pixdx)
'ally.Append (centery+pixdy)
'allz.Append z1
'allx.Append (centerx-pixdx)
'ally.Append (centery+pixdy)
'allz.Append z2
'allx.addrow( centerx-pixdx)
'ally.addrow( centery-pixdy)
'allz.addrow( z1 )
'allx.addrow( centerx-pixdx)
'ally.Addrow( centery+pixdy )
'allz.addrow( z1 )
'allx.addrow( centerx-pixdx)
'ally.Addrow( centery+pixdy )
'allz.addrow( z2 )
'///-------------------
'allx.Append (centerx-pixdx)
'ally.Append (centery-pixdy)
'allz.Append z2
'allx.Append (centerx-pixdx)
'ally.Append (centery-pixdy)
'allz.Append z1
'allx.Append (centerx-pixdx)
'ally.Append (centery+pixdy)
'allz.Append z2
'allx.addrow( centerx-pixdx)
'ally.addrow( centery-pixdy)
'allz.addrow( z2 )
'allx.addrow( centerx-pixdx)
'ally.Addrow( centery-pixdy )
'allz.addrow( z1 )
'allx.addrow( centerx-pixdx)
'ally.Addrow( centery+pixdy )
'allz.addrow( z2 )
'
'end if
'
'//check right
'if tmpsurf.Pixel(ii+1,jj).red<>255 then //means this current pixel is black but on the right it is white then close right
'///------------------
'allx.Append (centerx+pixdx)
'ally.Append (centery-pixdy)
'allz.Append z1
'allx.Append (centerx+pixdx)
'ally.Append (centery+pixdy)
'allz.Append z1
'allx.Append (centerx+pixdx)
'ally.Append (centery+pixdy)
'allz.Append z2
'allx.addrow( centerx+pixdx)
'ally.addrow( centery-pixdy)
'allz.addrow( z1 )
'allx.addrow( centerx+pixdx)
'ally.Addrow( centery+pixdy )
'allz.addrow( z1 )
'allx.addrow( centerx+pixdx)
'ally.Addrow( centery+pixdy )
'allz.addrow( z2 )
'///-------------------
'allx.Append (centerx+pixdx)
'ally.Append (centery-pixdy)
'allz.Append z2
'allx.Append (centerx+pixdx)
'ally.Append (centery-pixdy)
'allz.Append z1
'allx.Append (centerx+pixdx)
'ally.Append (centery+pixdy)
'allz.Append z2
'allx.addrow( centerx+pixdx)
'ally.addrow( centery-pixdy)
'allz.addrow( z2 )
'allx.addrow( centerx+pixdx)
'ally.Addrow( centery-pixdy )
'allz.addrow( z1 )
'allx.addrow( centerx+pixdx)
'ally.Addrow( centery+pixdy )
'allz.addrow( z2 )
'end if
'
'
'//check bottom
'if tmpsurf.Pixel(ii,jj+1).red<>255 then //means this current pixel is black but the bottom one is white then close bottom
'allx.Append (centerx-pixdx)
'ally.Append (centery-pixdy)
'allz.Append z1
'allx.Append (centerx+pixdx)
'ally.Append (centery-pixdy)
'allz.Append z1
'allx.Append (centerx-pixdx)
'ally.Append (centery-pixdy)
'allz.Append z2
'allx.addrow( centerx-pixdx)
'ally.addrow( centery-pixdy)
'allz.addrow( z1 )
'allx.addrow( centerx+pixdx)
'ally.Addrow( centery-pixdy )
'allz.addrow( z1 )
'allx.addrow( centerx-pixdx)
'ally.Addrow( centery-pixdy )
'allz.addrow( z2 )
'///-------------------
'allx.Append (centerx-pixdx)
'ally.Append (centery-pixdy)
'allz.Append z2
'allx.Append (centerx+pixdx)
'ally.Append (centery-pixdy)
'allz.Append z1
'allx.Append (centerx+pixdx)
'ally.Append (centery-pixdy)
'allz.Append z2
'allx.addrow( centerx-pixdx)
'ally.addrow( centery-pixdy)
'allz.addrow( z2 )
'allx.addrow( centerx+pixdx)
'ally.Addrow( centery-pixdy )
'allz.addrow( z1 )
'allx.addrow( centerx+pixdx)
'ally.Addrow( centery-pixdy )
'allz.addrow( z2 )
'end if
'
'
'//check top
'if tmpsurf.Pixel(ii,jj-1).red<>255 then //means this current pixel is black but on the top is white then close top
'allx.Append (centerx-pixdx)
'ally.Append (centery+pixdy)
'allz.Append z1
'allx.Append (centerx+pixdx)
'ally.Append (centery+pixdy)
'allz.Append z1
'allx.Append (centerx-pixdx)
'ally.Append (centery+pixdy)
'allz.Append z2
'allx.addrow( centerx-pixdx)
'ally.addrow( centery+pixdy)
'allz.addrow( z1 )
'allx.addrow( centerx+pixdx)
'ally.Addrow( centery+pixdy )
'allz.addrow( z1 )
'allx.addrow( centerx-pixdx)
'ally.Addrow( centery+pixdy )
'allz.addrow( z2 )
'///-------------------
'allx.Append (centerx-pixdx)
'ally.Append (centery+pixdy)
'allz.Append z2
'allx.Append (centerx+pixdx)
'ally.Append (centery+pixdy)
'allz.Append z1
'allx.Append (centerx+pixdx)
'ally.Append (centery+pixdy)
'allz.Append z2
'allx.addrow( centerx-pixdx)
'ally.addrow( centery+pixdy)
'allz.addrow( z2 )
'allx.addrow( centerx+pixdx)
'ally.Addrow( centery+pixdy )
'allz.addrow( z1 )
'allx.addrow( centerx+pixdx)
'ally.Addrow( centery+pixdy )
'allz.addrow( z2 )
'
'end if
'
'//check back
'if tmpsurf2.Pixel(ii,jj).red<>255 then //means this current pixel is black but on the top is white then close top
'
'allx.Append (centerx-pixdx)
'ally.Append (centery+pixdy)
'allz.Append z2
'allx.Append (centerx-pixdx)
'ally.Append (centery-pixdy)
'allz.Append z2
'allx.Append (centerx+pixdx)
'ally.Append (centery-pixdy)
'allz.Append z2
'allx.addrow( centerx-pixdx)
'ally.addrow( centery+pixdy)
'allz.addrow( z2 )
'allx.addrow( centerx-pixdx)
'ally.Addrow( centery-pixdy )
'allz.addrow( z2 )
'allx.addrow( centerx+pixdx)
'ally.Addrow( centery-pixdy )
'allz.addrow( z2 )
'///-------------------
'allx.Append (centerx+pixdx)
'ally.Append (centery+pixdy)
'allz.Append z2
'allx.Append (centerx-pixdx)
'ally.Append (centery+pixdy)
'allz.Append z2
'allx.Append (centerx+pixdx)
'ally.Append (centery-pixdy)
'allz.Append z2
'allx.addrow( centerx+pixdx)
'ally.addrow( centery+pixdy)
'allz.addrow( z2 )
'allx.addrow( centerx-pixdx)
'ally.Addrow( centery+pixdy )
'allz.addrow( z2 )
'allx.addrow( centerx+pixdx)
'ally.Addrow( centery-pixdy )
'allz.addrow( z2 )
'end if
'
'//check front
'if tmpsurf3.Pixel(ii,jj).red<>255 then //means this current pixel is black but the one before was white then close top
'
'allx.Append (centerx-pixdx)
'ally.Append (centery+pixdy)
'allz.Append z1
'allx.Append (centerx-pixdx)
'ally.Append (centery-pixdy)
'allz.Append z1
'allx.Append (centerx+pixdx)
'ally.Append (centery-pixdy)
'allz.Append z1
'allx.addrow( centerx-pixdx)
'ally.addrow( centery+pixdy)
'allz.addrow( z1 )
'allx.addrow( centerx-pixdx)
'ally.Addrow( centery-pixdy )
'allz.addrow( z1 )
'allx.addrow( centerx+pixdx)
'ally.Addrow( centery-pixdy )
'allz.addrow( z1 )
'///-------------------
'allx.Append (centerx+pixdx)
'ally.Append (centery+pixdy)
'allz.Append z1
'allx.Append (centerx-pixdx)
'ally.Append (centery+pixdy)
'allz.Append z1
'allx.Append (centerx+pixdx)
'ally.Append (centery-pixdy)
'allz.Append z1
'allx.addrow( centerx+pixdx)
'ally.addrow( centery+pixdy)
'allz.addrow( z1 )
'allx.addrow( centerx-pixdx)
'ally.Addrow( centery+pixdy )
'allz.addrow( z1 )
'allx.addrow( centerx+pixdx)
'ally.Addrow( centery-pixdy )
'allz.addrow( z1 )
'
'
'
Expand Down Expand Up @@ -1121,7 +1121,7 @@ Protected Class Rb3DSpace
'if f.Exists Then
'modelcode = f.OpenAsBinaryFile(false).Read(f.Length)
'Object_axisX.AddShapeFromString modelcode
'Objects.Append Object_axisx
'Objects.Addrow( Object_axisx )
'end
'end
'
Expand Down
Loading