algorithmic modeling for Rhino
I'm trying to create a Waldram diagram. I have code that creates curves that almost match it, but not quite.
The Waldram Diagram has an X and Y axis with values which both represent degrees. I believe one of the curve's formula is some variation of y*sin(x), as every Y value at 0 x is equal to itself (sin of 0 is 1). The other seems to be a variation of y*cos(x), as every Y value at 0 is equal to 0 (cos of 0 is 0).
Oddly enough there isn't much information online that I could find explaining how to plot a Waldram diagram. I have attached a picture of what I currently output, my desired output, and my code (zip file with visual studio solution).
I gave it a look, It is not simple. I just manage to find a transformation for the ordinate, it is an S-curve. See the script if it helps.
https://www.researchgate.net/publication/245507022_Waldram_was_wrong <- check this paper
There is the excel formula for plotting the graph.
P = 1-(COS((2*(DEGREES(ATAN(TAN((a)*PI()/180)*COS((b)*PI()/180))*PI()/180)))))
I believe P is the Y value. I had trouble with the conversion in python, so I wrote a plugin to plot this in C#. Got very close, but some of my values are a bit off, such that my curves are correct but the Y values are all a bit too large. I'm going to keep trying and see what my problem is but if anyone else wants to try (in python or C#) please post results.
This was my first round of results, as you can see the curve is pretty good, however the top curve should have a maximum y of 90, which it goes above
Am I mistaken on how rhino's coordinate system works? Because when I count the coordinates (see my screenshot) it looks like the top line is above 100, and none of the lines intersect at exact points (10, 20, 30, 40, 50). Yes, it does match up over top the document, but it doesn't seem to be plotting at the exact points.
Well your grid certainly doesn't seem to go to 100. It seems to only go to 70. Isn't the diagram supposed to go all the way up to 90?