Grasshopper

algorithmic modeling for Rhino

Anyone have any idea why I am getting all 0's as a result of this equation?

It's strange, I can only get the sin function to work when I'm taking the sin of an integer but not a decimal number?

- Adam

Views: 236

Attachments:

Replies to This Discussion

Well, since I'm trying to make this representative of a sound pitch, the frequency of the wave, my domain is 0 to 1 (trying to get cycles per second) and the number of steps is at 50 right now.
Expressions doesn't recognize domain type parameters.

If you open the Expression Editor and look in the field for variables, you will see "z As Boolean".

Your domain input is being evaluated as "False". Since False = 0 when used in an expression, all your results are 0.
As soon as I plug in a float for the domain, I'm getting results.
(instead of 0 to 1, I used 0 to 1.1)

perhaps there's some rounding involved? It seems the closer the Z value is to 1 or 0, the output from your equation in gh is 0 (but the math would yield a result of -0.6041.... if the x and y inputs are what you have shown in your example image)

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service