Circle Packing on a 3D NURBS Surface

Page 1

Circle Packing on a 3D NURBS Surface

Group 13 Benedict Edwards Thomas Fairbrother Daniel Hayes



CASE STUDY: N12 3D PRINTED FABRIC - CONTINUUM FASHION INTRODUCTION TO CIRCLE PACKING

2-3 4

EXPLANATION OF CIRCLE PACKING SOLUTION

4-5

CIRCLE PACKING ON A 3D NURBS SURFACE SCRIPT

6-10

CRITIQUE AND CONCLUSION RESULT ILLUSTRATIONS

11 12-13


N12 3D PRINTED FABRIC - CONTINUUM FASHION

CASE STUDY

INTRODUCTION

Basic circle packing We have selected an emerging technology from the world of fashion for this concept: case study, which, whilst being a fabric, has clear parallels with the requirements asked of in Architectural design. It is a perfect example of a relatively simple algorithmic formula being beneficially used to create a useful product (i.e. one that is in consideration of human needs, structural practicalities, aesthetics, and efficiency of design as opposed to pure experimental images). Importantly, its underlying principles can be extrapolated into built architectural form.

Designed by the company Continuum, this fabric utilises the qualities of N-12 Nylon to create a material that can be digitally designed and printed, ready to use, all in one seamless process. Current utilisations of this invention include a bikini which perfectly fits its user, is modelled to their exact shape, and exploits algorithmic principles to achieve an efficient, comfortable and materially economical product with a desirable aesthetic. With a minimum thickness of 0.7mm, it is possible to make working springs and almost thread-like connections. We have chosen to analyse this design further as it seems to be both relevant and interesting as a future use of the parametric tool, and has a good amount of materials associated with it which enable a rigorous analysis.

N.B. [http://www.supermanoeuvre.com/blog/?p=486]

1

2

K. Stephenson’s edge-angle equation of tangent circles:

3

4

5

6

Circle packing algorithmic script in action:

We have been unfortunately unable to obtain the exact script or algorithm from the designers. Research into general circle packing calculations have lead us to believe that K. Stephenson’s edge-angle equation of tangent circles may provide the basic principle for Continuum Fashion’s bespoke script. It allows one to calculate the angles within the triangle formed by the circles’ radii.

PROCESS 1) Surface:

In the case of the Continuum N-12 Bikini, the first step of manufacturing is a three dimensional body scan of a specific or typical user (they can be produced to custom order or stay within general sizes). The model of this scan is then imported into a modelling software (3D CAD Rhino) and is finalised as a three dimensional Nurb surface.

2) Circles:

At this point, the circles which form the mass of the material are algorithmically added to the curved surface via the instruction of a script. Created circles, are directed to the defined edge and each subsequent circle is required to stay as near to the nearest geometry’s edge as possible. The size of the circles is dependant on the distance between them and the curvature of the surface. Smaller circles will appear on more curved areas, and larger ones on flatter areas, which ultimately provides heightened comfort and flexibility where it is required. After this process has run through, gaps - such as those left by areas of extreme curves- are filled with further small circles to create a more unified aesthetic and of course protect the privacy of the users. CRITIQUE: Having seen footage of the executed algorithm and the appearance of the finished product, we are not entirely satisfied that the completed product is entirely based on the stated theory above, and question whether in fact manual alterations have occurred.

3) Connections: They then execute a supplementary algorithm in order to transform this circled packed surface into a printable 3D geometry. Each circle is extruded so that it has a top and bottom surface joined by a column perpendicular to the surface location. The spatially dislocated components are then joined to create a

2

N.B. screenshots of video “N12.bikini-Circle Packing” [http://vimeo.com/24496093]

Diagrammatic analysis of circle packing script: 1st Round Perimeter Packing

2nd Round Interior Circle Packing

3rd Round Smaller Circle Packing


fabric by positioning connective springs. It is unclear what methodology they Triangulated mesh formed by circle centres use to allocate the springs but they seem to follow the lines of triangulation post packing algorithm: on the resultant mesh from the packing algorithm. The final stage, before sending to the 3D printer, is to manually add any clips required for fastening and identifying any seams in the fabric.

4) Printing: The exciting application of a three dimensionally designed,

digital model is that it can be effortlessly sent straight to a 3D printer and manufactured in one piece. The exact method uses an additive manufacturing technique called ‘Selective Laser Sintering’ where a high powered laser fuses small particles of Nylon polymer to gradually form two dimensional layers N.B. [http://www.dezeen.com/2011/06/07/n12-3d-printwhich eventually culminate as a completed three dimensional product. ed-bikini-by-continuum-fashion-and-shapeways/]

CONCLUSION

Transformation of circle packed surface into 3D geometry for printing in Rhino:

The designers have achieved their aims of creating a bespoke luxury item of clothing, The limitations of the 3d printing medium currently available generated the need to design a product made of smaller interconnected component parts allowing adequate levels of comfort and flexibility. The algorithm was written in order to solve this problem in an efficient and adaptable way. We believe the designers have maximised the use of the script as part of the design process, apart from the query we had over any manual tweaking to the 3D geometry produced by the executed algorithm. The designers also confessed that the additional round of packing of smaller circles was for aesthetic reasons and may have had little benefit to the fabrics structure. Other limitations to the success of the product lie in its commercial viability, N.B. [http://www.dezeen.com/2011/06/07/n12-3d-printdue to the current high cost of the bespoke 3D printing manufacture process. ed-bikini-by-continuum-fashion-and-shapeways/]

Seam detail of the fabric for where connections are required.

PACKED by Min‐Chieh Chen, Dominik Zausinger and Michele Leidi This pavillion is an example of circle packing being used to to generate a structural architecural form. In this case each circle packed onto the hemisphere surface has been extruded into a truncated cone and then sectioned so that each element may be accurately cut and N.B. image by Ariel Efron [http://www.dezeen. com/2011/06/07/n12-3d-printed-bikini-by-continuassemble on site. um-fashion-and-shapeways/] Finished product worn by the subject of the inital 3D scan.

http://www.dezeen.com/2011/01/02/packed-by-min%E2%80%90chieh-chendominik-zausinger-and-michele-leidi/

N.B. [http://www.dezeen.com/2011/06/07/n12-3d-printed-bikini-by-continuum-fashion-and-shapeways/]

3


INTRODUCTION TO CIRCLE PACKING

Throughout history there have been many attempts to pack circles within a perimeter boundary. With the advent of computers and 3D visualisation, the challenge of packing on a 3D surface has been presented. Our case study demonstrates one method of packing circles onto a 3D surface, with the aim of developing a flexible 3D printed fabric. The concept of 3D packing has architectural potential, as shown in the “Packed Pavilion”. From this our aim was to develop our own method of packing circles on a 3D surface, more precisely expanding on an existing 2D packing script to place circles on a 3D NURBS surface.

CIRCLE PACKING SOLUTION Operating the Evaluated Script / User Interface 1. 2. 3. 4. 5. 6. 7.

Draw NURBS surface, it may be made of several attached surfaces. Press “Select NURBS” and then select surface in viewport. Specify maximum preferred number of circles to place using spinner. Specify Min. Radius and Max. Radius of circles to be placed. Specify Accuracy. Check if circles should only be placed within the perimeter of the NURBS. Check if circles placed should be transformed into cylinders and specify cylinder thickness.

8. Press “Generate Circles” to run script.


EXPLANATION OF CIRCLE PACKING SCRIPT No Overlap

Overlaps piece of the script is used to allow the circles to pack on the surface without any circles intersecting each other. For a new circle to be created the distance between its centre point and the centre of the previous circle must be larger or equal to the sum of the new circle’s radius and the previous circle’s radius.

R

Overlap

This check is done between the new circle and every circle listed on the surface; if it proves to be true then it will be added to the list of circles and created.

R

U

V

R

U and V are the axes of the NURBS surface and are used to find any point on the surface. When placing a circle on the surface, a point is randomly generated with a u and v value. These values create a u and v tangents from the surface, which R are combined to find the normal (cross-product). The circle is then generatedU on the point with its radius perpendicular to this normal. A shell modifier is applied to each circle placed on the surface and extrudes each to a thickness U provided from the spinner, forming a 3D cylinder. U

R

UV Points U

V

V U V

V

U

Finding normal

V

V

U V

Shelling

5


CIRCLE PACKING ON 3D NURBS SURFACE - SCRIPT utility circleNURBS "circleNURBS" ( global selectedSurface global maxCircles = 100 global minRadius = 1 global maxRadius = 5 global ns global minu, maxu global minv, maxv global uTangent global vTangent global circles = #() global radius = 10 global accuracy = 32 global withinperimeter = false global cylinderthickness = 10 fn nurbs_filt obj = (classOf obj == NURBSSurf) pickbutton selectNURBS "Select NURBS" width:140 filter:nurbs_filt edittext selectedObject "NURBS: " text:"NONE" readonly:true width:138 spinner maxCircles_spinner "Circles: " range:[1,10000,maxCircles] type:#integer spinner minRadius_spinner "Min. Radius: " range:[0.1,10000,minRadius] type:#worldunits spinner maxRadius_spinner "Max. Radius: " range:[0.1,10000,maxRadius] type:#worldunits spinner accuracy_spinner "Accuracy: " range:[4,64,accuracy] type:#integer edittext packedCircles " Packed: " text:"0 Circles" readonly:true width:138 checkbox withinperimeter "Place Only Within Perimeter" checked:true checkbox createcylinders "Create Cylinders" checked:false spinner cylinderthickness_spinner "Thickness: " range:[1,1000,cylinderthickness] type:#worldunits enabled:false button generate_button "Generate Circles" enabled:true on createcylinders changed theState do (cylinderthickness_spinner.enabled = theState) on selectNURBS picked obj do ( if obj != undefined do ( selectedObject.text = obj.name ns=getnurbsset obj #relational selectedSurface = obj ) ) fn overlaps myCircle circles= ( if(circles.count < 2) then ( return false ) for j=1 to j=circles.count do ( result = (distance myCircle.pos circles[j].pos) <= (myCircle.radius+ circles[j].radius)

6


)

if result then return result ) return false

fn outside_NURBS myCircle myNURBS = ( for j = 0 to accuracy by 1 do ( ang = (j/accuracy as float)*360 vx = myCircle.pos.x + cos(ang) * myCircle.radius vy = myCircle.pos.y + sin(ang) * myCircle.radius testRay = ray [vx, vy, 1] [0, 0, -10] if (intersectRay myNURBS testRay == undefined) then ( return true ) ) return false ) on generate_button pressed do ( if withinperimeter.checked then ( circlesCount = circles.count packedCircles.text = "0/"+(maxCircles as string)+" Circles" for i = 1 to circlesCount by 1 do ( tobedeleted = circles[1] deleteItem circles 1 if(isDeleted tobedeleted != true) then ( delete tobedeleted ) ) ns=getnurbsset selectedSurface #relational for i = 1 to ns.count by 1 do ( if((superClassOf ns[i]) == NURBSSurface) then for j=1 to j=maxCircles by 1 do (

minu=(ns[i].uParameterRangeMin) maxu=(ns[i].uParameterRangeMax) minv=(ns[i].vParameterRangeMin) maxv=(ns[i].vParameterRangeMax) uwidth=maxu-minu vwidth=maxv-minv upos=random minu maxu vpos=random minv maxv cpos=(evalpos ns[i] upos vpos)+selectedSurface.pos

7


uTangent =(evalUTangent ns[i] upos vpos) vTangent = (evalVTangent ns[i] upos vpos) normal= (normalize (cross uTangent vTangent)) radius = random minRadius maxRadius myCircle= Circle radius:radius myCircle.pos=cpos myCircle.dir=normal format "Circle Count = %\n" circles.count circlePos = myCircle.pos circleRadius = myCircle.radius

) else (

)

if(circles.count < 2) then ( format "Initial Circle Placed\n" append circles myCircle ) else if (overlaps myCircle circles) or (outside_NURBS myCircle selectedSurface) then ( format "Circle deleted\n" delete myCircle ) else ( format "Circle is OK\n" append circles myCircle ) )

circlesCount = circles.count packedCircles.text = "0/"+(maxCircles as string)+" Circles" for i = 1 to circlesCount by 1 do ( tobedeleted = circles[1] deleteItem circles 1 if(isDeleted tobedeleted != true) then ( delete tobedeleted ) )

ns=getnurbsset selectedSurface #relational for i = 1 to ns.count by 1 do ( if((superClassOf ns[i]) == NURBSSurface) then for j=1 to j=maxCircles by 1 do (

uTangent =(evalUTangent ns[i] upos vpos) vTangent = (evalVTangent ns[i] upos vpos) normal= (normalize (cross uTangent vTangent)) radius = random minRadius maxRadius myCircle= Circle radius:radius myCircle.pos=cpos myCircle.dir=normal format "Circle Count = %\n" circles.count circlePos = myCircle.pos circleRadius = myCircle.radius

) else (

)

if(circles.count < 2) then ( format "Initial Circle Placed\n" append circles myCircle ) else if (overlaps myCircle circles) or (outside_NURBS myCircle selectedSurface) then ( format "Circle deleted\n" delete myCircle ) else ( format "Circle is OK\n" append circles myCircle ) )

circlesCount = circles.count packedCircles.text = "0/"+(maxCircles as string)+" Circles" for i = 1 to circlesCount by 1 do ( tobedeleted = circles[1] deleteItem circles 1 if(isDeleted tobedeleted != true) then ( delete tobedeleted ) ) ns=getnurbsset selectedSurface #relational for i = 1 to ns.count by 1 do ( if((superClassOf ns[i]) == NURBSSurface) then for j=1 to j=maxCircles by 1 do (

8


minu=(ns[i].uParameterRangeMin) maxu=(ns[i].uParameterRangeMax) minv=(ns[i].vParameterRangeMin) maxv=(ns[i].vParameterRangeMax) uwidth=maxu-minu vwidth=maxv-minv upos=random minu maxu vpos=random minv maxv cpos=(evalpos ns[i] upos vpos)+selectedSurface.pos uTangent =(evalUTangent ns[i] upos vpos) vTangent = (evalVTangent ns[i] upos vpos) normal= (normalize (cross uTangent vTangent)) radius = random minRadius maxRadius myCircle= Circle radius:radius myCircle.pos=cpos myCircle.dir=normal format "Circle Count = %\n" circles.count circlePos = myCircle.pos circleRadius = myCircle.radius if(circles.count < 2) then ( format "Initial Circle Placed\n" append circles myCircle )

)

)

else if (overlaps myCircle circles) then ( format "Circle deleted\n" delete myCircle ) else ( format "Circle is OK\n" append circles myCircle ) )

packedCircles.text = (circles.count as string)+"/"+(maxCircles as string)+" Circles" if createcylinders.checked then

)

(shell_mod = shell() addmodifier circles shell_mod shell_mod.innerAmount=cylinderthickness)

on maxCircles_spinner changed amt do

9


( format "maxcircles amt changed success\n" maxCircles = amt ) on cylinderthickness_spinner changed amt do ( cylinderthickness=amt ) on minRadius_spinner changed amt do ( minRadius = amt if(maxRadius < minRadius) then ( maxRadius = minRadius maxRadius_spinner.value = minRadius ) ) on maxRadius_spinner changed amt do ( maxRadius = amt if(minRadius > maxRadius) then ( minRadius = maxRadius minRadius_spinner.value = maxRadius ) ) on accuracy_spinner changed amt do ( accuracy = amt ) )

10


CRITIQUE AND CONCLUSION

The circles are more sparsely packed than might be desirable. This is to do with the absence of the coverage function found in the original 2D circle packing script. Currently, the circles are randomly placed as in the 2D circle packing script. Ideally, with development, we would look into alternative packing methods to provide tighter packing with touching circles. This would allow the packed array of circles covering the NURBS to become a more continuous surface (a 3D printable fabric for example) and possibly a self supporting structural entity. Although the circles we place are not overlapping, when they are extruded to cylinders there may then be overlapping of the 3D components. This could potentially be overcome by creating truncated cones computed using the surface normals instead of cylinders.

11


RESULT ILLUSTRATIONS

PRODUCED BY AN AUTODESK EDUCATIONAL PRODUCT

PRODUCED BY AN AUTODESK EDUCATIONAL PRODUCT

PRODUCED BY AN AUTODESK EDUCATIONAL PRODUCT PRODUCED BY AN AUTODESK EDUCATIONAL PRODUCT

RODUCED BY AN AUTODESK EDUCATIONAL PRODUCT

PRODUCED BY AN AUTODESK EDUCATIONAL PRODUCT

12

Circles on 3d NURBS Surface


Cylinders on 3d NURBS Surface

Close up of packed cylinders


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.