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:
Jake Hibbert

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 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 module, as shown below. result of Guilo's component in blue, result of my exercise python component in pink.

I can't figure out the approach to map/compute t? I tried "shift list" type options, (pop), but that didn't yield the effect I was hoping for. Below is what "t" in Guilio's component does.

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, (easiest is to place it in a folder in a path specified in your rhino python editor options, module paths), and the gh files.

( do you post/format code blocks in posts?)

Views: 982


Replies to This Discussion

Thanks Giulio!  I'll pick up the discussion over there!






  • Add Photos
  • View All

© 2020   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service