Parametric design in MoI?
 1-9  …  870-889  890-909  910-912

Previous
Next
 From:  bemfarmer
7713.910 In reply to 7713.908 
Google search often yields responses on stackoverflow, which can be helpful, (if understandable)

See last answer here:
https://stackoverflow.com/questions/13975745/the-fastest-way-to-get-current-quadrant-of-an-angle

The degree angle theta needs to be converted to radians, to use the Javascript Math.sin[radianAngle]. (Max removed the need to use Math. in front of sin)

if sin[theta*PI/180] >= 0 , then output is +1.

if sin[theta*PI/180] < 0 , then output is -1.

So compare does seem to be useful. The Sine provides similar benefit to using modulus of +/- angle. Javascript Modulus (%), of angle could be used instead of Sine...

- Brian

EDITED: 6 Apr 2022 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Psygorn (DRILLBIT)
7713.911 In reply to 7713.909 
Thank you Brian,

Now, I got it!

:)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Psygorn (DRILLBIT)
7713.912 In reply to 7713.910 
Thank you again, Brian,

Your explanation helped a lot!

I was able to solve the problem and here are the results:

http://moi3d.com/forum/index.php?webtag=MOI&msg=10641.16

I would be happy to know your opinion about it! (I mean could I do it better?)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages:  1-9  …  850-869  870-889  890-909  910-912