Grasshopper

algorithmic modeling for Rhino

Mr. Rutten, this is lovingly for you:

(Using: GH Version August-02, 2012)

I started out wanting to do a very simple vector subtraction for a much larger complex form I'm working with, but I realized what I really needed were spherical coordinates. Component "Point Polar", in the Point section of the Vector tab is the one thing I found dealing with polar/spherical coordinates. I set out to define all the spherical coordinate math I needed (and produce about 8 useful spherical-to-XYZ-coordinate-system transformation components as a byproduct), but I couldn't quite get it to work.

After a few hours of debugging, I discovered "Point Polar" is broken, kind of. It reverses it's Y and Z outputs. It does all the math correctly it turns out, but when calculating X, Y, and Z from inputs Phi, Theta, and Rho/Offset, Point Polar actually outputs a point with the coordinates {X,Z,Y}. I checked this multiple times by hand and calculator.

In summary:

-Point Polar messes up the output {X,Y,Z} point and gives {X,Z,Y} instead.

-Additionally, do you have any more spherical coordinate components out there? I can end up custom making any I need, but I'm running into trouble with arccos,arctan, and arcsin having NaN issues when zero is in the denominators.

Thanks!

Views: 883

Attachments:

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service