[BEHAVIOR] Polar Coordinates

Post your completed addons to share with the community

Post » Mon Aug 07, 2017 10:47 pm

DOWNLOAD: https://drive.google.com/open?id=0B2mWg ... 0NQOTNGbG8

Image

Polar Coordinates behavior

It allows you to use polar coordinates instead of orthogonal coordinates (regular X,Y)

Properties:
  • OriginX
  • OriginY
  • DeltaX (aka the distance to the Origin)
  • DeltaY (aka the angle)
  • Status (Enabled or Disabled)

ACES:
Actions:
  • Set Origin
  • Set Delta Position
  • Set Enabled
  • Update

Conditions:
  • Comapre Origin
  • Compare Delta Position
  • Is Enabled

Expression:
  • Origin
  • Delta Position
  • Status

DOWNLOAD: https://drive.google.com/open?id=0B2mWg ... 0NQOTNGbG8
Image
B
34
S
6
G
2
Posts: 221
Reputation: 3,324

Post » Mon Aug 07, 2017 11:00 pm

That is exactly what i missed for a long time. Ima snap this tomorrow.
B
33
S
18
G
28
Posts: 2,475
Reputation: 20,914

Post » Tue Aug 08, 2017 2:12 am

Tell me if you see anything wrong or that I could do better
Image
B
34
S
6
G
2
Posts: 221
Reputation: 3,324

Post » Tue Aug 08, 2017 10:28 am

Oh i am happy with it as it is (how it works).

I would like to suggest other names, to give it more an intuitive 'polar feeling'. But that is up to you.

.OriginX i would name .PoleX / .PoleY. "Pole" is mostly used to point to that point. (i think)
.DeltaX i would name .Radius
.DeltaY i would name .Azimuth. "Angle" is taken. And Azimuth means the angle to a reference angle.

You could add that 'reference angle' (the polar axis, up to you), but i guess that will complicate things for most users. Everyone is used to zero angle as reference.

Say you have two objects under an angle(x1,y1,x2,y2)
Say we can set an expression .ReferenceAngle to that angle. (or leave it to a default zero)
Then we can set .Azimuth with .ReferenceAngle as the angle from where .Azimuth starts to rotate from.

Now we can easily go along with rotated coordinate systems.
B
33
S
18
G
28
Posts: 2,475
Reputation: 20,914

Post » Tue Aug 08, 2017 4:26 pm

99Instances2Go wrote:I would like to suggest other names, to give it more an intuitive 'polar feeling'. But that is up to you.

.OriginX i would name .PoleX / .PoleY. "Pole" is mostly used to point to that point. (i think)
.DeltaX i would name .Radius
.DeltaY i would name .Azimuth. "Angle" is taken. And Azimuth means the angle to a reference angle.


Well the Origin X and Y designate the position of the origin of the polar coordinates (aka the point (0,0)), so I think it's better named that way.
I could name DeltaX and DeltaY, Radius and Angle for clarity purposes. Also the "Angle" is not necessarily taken as it will be Object.PolarCoordinates.Angle

99Instances2Go wrote:You could add that 'reference angle' (the polar axis, up to you), but i guess that will complicate things for most users. Everyone is used to zero angle as reference.
Say you have two objects under an angle(x1,y1,x2,y2)
Say we can set an expression .ReferenceAngle to that angle. (or leave it to a default zero)
Then we can set .Azimuth with .ReferenceAngle as the angle from where .Azimuth starts to rotate from.


I understand what you mean but I don't think that's really useful. The purpose of the plugin is to allow the use of polar coordinates, not make the act of polar rotation easier. However, you can make that pretty easily, as you can see in the two example capx.
And you can set the "Start" angle from the editor in the behavior's parameters, so it's kinda similar to what you want.
Image
B
34
S
6
G
2
Posts: 221
Reputation: 3,324

Post » Thu Aug 10, 2017 12:52 am

UPDATE:
Renamed DeltaX and DeltaY to Radius and Angle.
Added CarToPol and PolToCar expressions to convert Carthesian to Polar and vice versa.

Same download: https://drive.google.com/open?id=0B2mWg ... 0NQOTNGbG8
Image
B
34
S
6
G
2
Posts: 221
Reputation: 3,324


Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest