algorithmic modeling for Rhino
This is a learning exercise. (and perhaps too long of a problem statement, apologies in advance).
I've been trying to brush up on some python stuff recently and started down a particluar path, based on some awesome work that has already been done by Guilo, (compiled component here):
And trying to expand on what has already been expermented with here:
I wanted to see how to recreate guilo's component in python.
First off, as far as I know, IronPython currently does not have a noise class/function. If it does, please feel free to let me know. As a "work around", I have used this:
grabbed perlin.py and set a path to it for the use of this exercise.
Now, onto the problem at hand:
I can't figure out how to compute something similar to "t". In this case, t = "some domain that will be consirded time", (or for the after effects/trapcode people, perhaps evolution, or flow is a better word).
The process of applying perlin noise, (or simplex noise more accurately), to a given point is relatively straight forward using the attached perlin.py module, as shown below. result of Guilo's component in blue, result of my exercise python component in pink.
Here is my stab at it, but I just cant' figure out how to approach t? If anyone has any suggestions, it would be greatly appreciated!
import Rhino as r
import perlin as p
sn = p.SimplexNoise()
pVals = 
for pt in pts: #trying to figure out how to implement t.....offset x/y/z scale somehow?
if t < 0:
noise = sn.noise3(pt.X*scl, pt.Y*scl, pt.Z*scl)
noise = sn.noise3(pt.X*scl, pt.Y*scl, pt.Z*scl)#what's the approach?
b = pVals
I am attaching perlin.py, (easiest is to place it in a folder in a path specified in your rhino python editor options, module paths), and the gh files.
(also...how do you post/format code blocks in posts?)
This discussion is also posted on discourse:
Thanks Giulio! I'll pick up the discussion over there!