JenniferK
Posts: 26 |
Why does the cosine component return these values for 180 degrees (via Angle Control) vs the -1 it'd return if 180 was plugged into it with a regular slider? (see picture)
Also, (if it isn't too complicated) if I know the cosine value of an angle, how do I determine the angle in degrees (with math components?) Thanks in advance. ![]() |
|||
Posted: May 22, 2022 3:22 pm | ||||
emme |
When the Angle Control is connected to a color input, it returns a a color based on HLS color model. The angle determines the hue. You can use the Extract HLS component to convert the hue back to a rotation value.
I don't think you can determine the exact angle from a cosine alone. For example the cosine of both 60 and 300 degrees would be 0.5 |
|||
Posted: May 23, 2022 11:16 am | ||||
JenniferK
Posts: 26 |
Thanks for the info.
I was trying to use make an adjustable triangle shape using three free rectangles comped on top of each other(see picture): "Square One" is locked to a diameter of one and doesn't move. It forms the top side of the triangle. Squares Two and Three are located one unit below the first ones. Square two rotates from it's top left corner (via angle slider) to form the second side of the slider. It's length can be changed (.05-1) by a second slider. Square Three is similar to Square 2 except it swings from the top left corner to form the third side of the triangle. I was fooling around with different versions of c2 = a2 + b2 − 2ab cos© via math nodes to get the correct angle and size for C, but can't quite get it to work. Is it possible? The most practical approach? ![]() |
|||
Posted: May 23, 2022 5:20 pm | ||||
Rachel Duim
![]() |
||||
Posted: May 23, 2022 7:17 pm | ||||
Rachel Duim
![]() |
||||
Posted: May 23, 2022 7:17 pm | ||||
Rachel Duim
![]() |
||||
Posted: May 23, 2022 7:19 pm | ||||
JenniferK
Posts: 26 |
Thanks! That's very close to what I had in mind.
What I'm still trying to figure out is whether or not it's possible to 1. (Sliders) adjust the length and angle of the blue shape (specifically, at it's pivot point where it meets the green corner) 2. and have the red shape pivot/change size to complete the triangle. |
|||
Posted: May 26, 2022 2:11 pm | ||||
Rachel Duim
![]() |
I went with the simple solution (just angle). Will take a look at adding the length… super busy when time allows.
Math meets art meets psychedelia. |
|||
Posted: May 27, 2022 6:19 pm | ||||
JenniferK
Posts: 26 |
No worries. Take your time. ![]() In the meantime I have some ideas of how it to put it together, so if I get something that works I'll post it here. |
|||
Posted: May 27, 2022 8:10 pm | ||||
JenniferK
Posts: 26 |
Update- I put together a script based on the math on this page: https://www.mathsisfun.com/algebra/tri...ngles.html but got stuck at the part where the sine of b gets converted into an angle (see picture). Can that be calculated with filter forge math nodes? Is there a formula? ![]() |
|||
Posted: May 27, 2022 11:57 pm | ||||
Rachel Duim
![]() |
||||
Posted: May 28, 2022 1:48 pm |
Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!
33,711 Registered Users
+18 new in 30 days!
153,533 Posts
+38 new in 30 days!
15,348 Topics
+73 new in year!
29 unregistered users.