Changeset 30700 in project for release/4/picnic/trunk/examples/GLHP.picnic
 Timestamp:
 04/14/14 07:11:38 (7 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

release/4/picnic/trunk/examples/GLHP.picnic
r30693 r30700 97 97 98 98 (component (type section) (name ParallelFibers) 99 # 100 (component (type perturbation) 101 102 (define pc (gid origin init) 103 (let ((freq (randomUniform (1.0 ~ (PFlength / 40.0) ~ init)))) 104 105 ;; SineCurve (frequency, amplitude) 106 (SineCurve (freq 1.0)))) 107 108 (const n = 4) 109 110 (output pc n) 111 112 ) 113 114 (component (type perturbation) 115 116 (define pc (gid origin init) 117 (let ((slope (randomUniform (1.0 ~ (PFlength / 40.0) ~ init)))) 118 119 ;; TanhCurve (onset, slope, amplitude) 120 (TanhCurve (0.0 freq 1.0)))) 121 122 (const n = 4) 123 124 (output pc n) 125 126 ) 127 # 99 128 100 129 (defun f (gid origin) … … 102 131 (dY 0) 103 132 (dZ 0)) 104 LineSegment (origin dX dY dZ)))133 (LineSegment (origin dX dY dZ)))) 105 134 106 135 (defun g (gid origin) … … 108 137 (dY 0) 109 138 (dZ 0)) 110 LineSegment (origin ~ (neg (dX)) ~ dY ~ dZ))) 111 112 (defun pfx (x init) 113 (let ((freq (randomUniform (1.0 100.0 init)))) 114 (tanh (PI * x) + 0.01 * sin (2 * PI * 100 * x)))) 115 116 (defun pfy (y init) 117 (let ((freq (randomUniform (1.0 100.0 init)))) 118 (tanh (PI * y) + 0.01 * sin (2 * PI * freq * y)))) 119 120 (defun pfz (z init) 121 (let ((freq (randomUniform (1.0 100.0 init)))) 122 (tanh (PI * z) + 0.01 * sin (2 * PI * freq * z)))) 123 124 (pc = (SimpleCurve pfx pfy pfz 10)) 139 (LineSegment (origin ~ (neg (dX)) ~ dY ~ dZ)))) 125 140 126 141 (const n = 1) … … 128 143 ;; process u grows in the positive X direction 129 144 ;; process v grows in the negative X direction 130 (p (u) = (generator f) ( compose pc) (npts 200))131 (p (v) = (generator g) ( compose pc) (npts 200))145 (p (u) = (generator f) (npts 200)) 146 (p (v) = (generator g) (npts 200)) 132 147 133 148 (output u n v n)
Note: See TracChangeset
for help on using the changeset viewer.