Polar coordinates: Can I change the location of the pole?

Discussion forum for G-Force users

Moderators: BTT, andy55, b.dwall, juxtiphi

Post Reply
User avatar
duncan
Posts: 11
Joined: Sat Mar 19, 2005 2:56 pm
Location: San Francisco, CA

Polar coordinates: Can I change the location of the pole?

Post by duncan »

Hello everyone,

I am beginning to write my own G-Force scripts, and I am curious to know if there is a way to change or translate the position of the pole when using polar coordinates in FlowField configs.

All I want to do is modify an existing config such that the pole is in in a corner of the screen, instead of in the center, at the origin. Surely there is a way to set the polar (X,Y)? Or perhaps there is an equation to translate srcR and srcT?

I am using G-Force Gold 2.8.

Any help would be appreciated.

Duncan

User avatar
JayPro
Posts: 738
Joined: Sat May 01, 2004 10:51 pm
Location: Huntington Station, Long Island, New York

Post by JayPro »

Off the bat, I'd guess that you might be able to incorporate X and Y values in the R/T source statements in order to achieve this.

I've seen flowfields showing the focus of attention to be more or less off-center screen, and as I said before, I'd think that using the occasional x & y in the R and T statements could pull something like that off.
"God is syntax."

Rovastar
Posts: 295
Joined: Wed May 05, 2004 9:25 am
Location: Derby/London, England

Post by Rovastar »

You need to look at polar cartesian conversions.

http://www.delphiforfun.org/Programs/Ma ... tesian.htm

as

R=Sqrt(X*X+Y*Y)

work fine there is a problem with

Theta=ArcTan(Y/X)

as Andy hasn't yet implemented the correct signage for calculting theta the same as the above equation.

A more detailed explaination about it is here:

http://soundspectrum.com/v-web/bulletin ... +certesian

Post Reply