27 April 2009

Phyllotaxis system01

From Wikipedia "In botany, phyllotaxis or phyllotaxy is the arrangement of the leaves on the stem of a plant.

I'm working on phyllotaxis system in order to construct vertical spiral variations with a rhinoscript code:



-plot an array of points by x,y,z coordinates follwing mathematical logic with several variations
-draws 2 lines in order to draw first petal profile
-divide profile in one array of points defined by the user
-draw circle with previous array points as centerpoint and curvature value of profile petal as radius
-create loft surfaces
-make a polar array to realize final system

"hot" code:
----------------------
'Script copyrighted by www.madeincalifornia.blogspot.com
'Script version Thursday, 16 April 2009 17:43:39

Call phyllotaxis_system()
Sub phyllotaxis_system()

Dim x,y,z,theta
Dim n:n=0

Dim dbla,dblb,dble,strobjects,strtxt,strline,ArrCurves3,p
'Call Rhino.EnableRedraw(False)

For n=0 To 50 Step 0.5
ReDim Preserve arrPts(n),arrPts1(n)
ReDim Preserve arrcircle(n),arrcone(n)
Dim arrplane
theta=(n/100)*rhino.pi
dbla=1
dblb=2
dble= 2.7182818284590
x=dbla*(dble*(dblb*theta))*cos(theta)
y= -dbla*(dble*(dblb*theta))*sin(theta)
z=log10(n)*10/2
arrPts(n) = array(x,y,z)
rhino.AddPoint arrpts(n)

Next
End Sub
----------------------

4 commenti:

pw said...

hi there
the drawings look amazing
just wonder if I can do this phyllotaxis system using grasshopper only instead of the script?

I just started learning rhino for a week.
thanks

DAVIDE DEL GIUDICE said...

Hi pegz,

if can do it following this post:

http://madeincalifornia.blogspot.com/2009/08/phyllotaxis-system-04.html

cheers,

D

Unknown said...

Hi ,My name is Ross Dempsey and I studied math as a hobby .I spent a lot of time playing with equations in excell and making scatter plots.I have a scatter plot with a photo of a sun flower in the back ground ,and I have it set up so you can change the exponent of the spiral growth ,and found out if you set the exponent at zero it matched the sunflower photo as close as possible .its a linear spiral .

DAVIDE DEL GIUDICE said...

Hi Ross, it’s sounds interesting. Do you have any images to share?