YOUR ACCOUNT

Login or Register to post new topics or replies
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.

  Details E-Mail
emme
Posts: 718
Filters: 8
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
  Details E-Mail
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?

  Details E-Mail
Rachel Duim
So Called Tortured Artist

Posts: 2498
Filters: 188
Here's an example. This geometry is a special case in my example, where the red and blue rectangles meet is a right angle. Does this help? It can be done with a different angle, this case simplifies the math.

Math meets art meets psychedelia.
  Details E-Mail
Rachel Duim
So Called Tortured Artist

Posts: 2498
Filters: 188
And the code in FF7

Triangles Meeting.ffxml
Math meets art meets psychedelia.
  Details E-Mail
Rachel Duim
So Called Tortured Artist

Posts: 2498
Filters: 188
transparency issue try again

Math meets art meets psychedelia.
  Details E-Mail
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.
  Details E-Mail
Rachel Duim
So Called Tortured Artist

Posts: 2498
Filters: 188
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.
  Details E-Mail
JenniferK
Posts: 26
Quote
Rachel Duim wrote:
I went with the simple solution (just angle). Will take a look at adding the length… super busy when time allows.

No worries. Take your time. smile:D
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.
  Details E-Mail
JenniferK
Posts: 26
Quote
Rachel Duim wrote:
I went with the simple solution (just angle). Will take a look at adding the length… super busy when time allows.


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?

  Details E-Mail
Rachel Duim
So Called Tortured Artist

Posts: 2498
Filters: 188
The component is ArcSine. Here's a screenshot using rotation units. ArcSine(0.7122...) returns 0.1261... in rotations which is 45.4 degrees. And yes, do not round off any results.

Math meets art meets psychedelia.
  Details E-Mail

Join Our Community!

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!

Create an Account

Online Users Last minute:

29 unregistered users.

Recent Forum Posts: