Compare commits
2 Commits
raczejosta
...
master
Author | SHA1 | Date | |
---|---|---|---|
c57b8000b9 | |||
5aa5950d4b |
BIN
Populus nigra italica.pptx
Normal file
BIN
Populus nigra italica.pptx
Normal file
Binary file not shown.
26
drzewo.lpy
26
drzewo.lpy
@ -1,13 +1,9 @@
|
||||
import random
|
||||
a = 50
|
||||
dl = 0.35
|
||||
length = 2
|
||||
dl = 0.05
|
||||
globalwidth = 1.5
|
||||
degree = 70
|
||||
phi = 90
|
||||
alpha = 32
|
||||
beta = 20
|
||||
step = 0.1
|
||||
stepleaf = 0.3
|
||||
def Start():
|
||||
#random.seed(150)
|
||||
pass
|
||||
@ -32,22 +28,12 @@ B(x,k):
|
||||
produce F(0.8,0.05+0.25/k)[/(r*500)+(20)_(0.02)F(1)C(1,1.0)]B(x+1,k+1)
|
||||
C(x,k):
|
||||
r = random.random()
|
||||
if x <= 1:
|
||||
produce F(0.6)C(x+1,k+1);(2)k(step-0.2)
|
||||
if x <= 3:
|
||||
produce F(0.6)C(x+1,k+1);(2)Leaf()
|
||||
|
||||
Leaf():
|
||||
produce Sweep(path,section,length,dl,globalwidth,leafwidth)
|
||||
|
||||
|
||||
k(s):
|
||||
if s >= 2.9:
|
||||
produce Sweep(path,section,s,dl,globalwidth,leafwidth)
|
||||
else:
|
||||
produce k(s+stepleaf)
|
||||
homomorphism:
|
||||
k(s):
|
||||
produce Sweep(path,section,s,dl,globalwidth,leafwidth)
|
||||
|
||||
interpretation:
|
||||
endlsystem
|
||||
###### INITIALISATION ######
|
||||
|
||||
@ -67,7 +53,7 @@ def __initialiseContext__(context):
|
||||
)
|
||||
path.name = "path"
|
||||
section = pgl.NurbsCurve2D(
|
||||
ctrlPointList = pgl.Point3Array([(-0.672727, 0, 1),(-0.421083, 0.285059, 1),(0.023332, -0.20146, 1),(0.337225, -0.0436618, 1),(0.695455, 0.00454545, 1)]) ,
|
||||
ctrlPointList = pgl.Point3Array([(-0.672727, 0, 1),(-0.324715, 0.227106, 1),(0.023332, -0.20146, 1),(0.337225, -0.0436618, 1),(0.695455, 0.00454545, 1)]) ,
|
||||
)
|
||||
section.name = "section"
|
||||
import openalea.plantgl.all as pgl
|
||||
|
@ -29,7 +29,7 @@ B(x,k):
|
||||
C(x,k):
|
||||
r = random.random()
|
||||
if x <= 3:
|
||||
produce F(0.6)C(x+1,k+1);(2)Leaf()
|
||||
produce F(0.6)C(x+1,k+1);(2)&(r*200)Leaf()
|
||||
|
||||
Leaf():
|
||||
produce Sweep(path,section,length,dl,globalwidth,leafwidth)
|
||||
@ -66,7 +66,7 @@ def __initialiseContext__(context):
|
||||
)
|
||||
treepath.name = "treepath"
|
||||
finish = pgl.BezierCurve2D(
|
||||
pgl.Point3Array([(-0.465217, 0.00434783, 1),(-0.310145, 0.0826087, 1),(-0.324638, 0.456522, 1),(-0.34633, 0.672535, 1)]) ,
|
||||
pgl.Point3Array([(-0.465217, 0.00434783, 1),(-0.310145, 0.0826087, 1),(-0.324638, 0.456522, 1),(-0.408696, 0.669565, 1)]) ,
|
||||
)
|
||||
finish.name = "finish"
|
||||
treepath2 = pgl.NurbsCurve2D(
|
||||
|
Loading…
Reference in New Issue
Block a user