2
$\begingroup$

I am trying to generate a circle from points turned towards the center and for some reason magic (or a bug) happens. As you can see, for four elements the angle is 90 degrees, but in radians, incorrect values and incorrect rotation of objects are obtained.enter image description here

But if you set 90 degrees with your hands for example, then everything works (for one iteration). enter image description here

Differences in radians.

enter image description here

Does anyone know what the problem might be?

$\endgroup$
1
  • 1
    $\begingroup$ Haven't dabbled much in geometry nodes. In almost all cases in blender, the "raw" angle value is in radians. Looking at image it appears you are getting an angle circa >>> math.degrees(90) / 360 which is 14.323944878270579 degrees. Try setting the step in radians $pi / 2$ (An angle in UI is displayed as degrees, if degrees is the default rotation unit in scene units settings.) ` $\endgroup$
    – batFINGER
    Commented Jun 6, 2021 at 10:23

1 Answer 1

5
$\begingroup$

When you set an angle in degrees in the Point Rotate node, it is automatically converted to radians under the hood.

All angle operations are done in radians because that's how trigonometry is defined. You can assume that if it's not expliciltly noted that you are working with degrees (°), you should write angles in radians.

You set the attribute to 90, thinking the unit was degrees, but it isn't. 90 radians is the same as 2.035 radians. In a python console, type :

from math import pi    
print(90 % (2 * pi)) # 90 modulo 2 pi -> Constrain angle to [0..2pi[

The output :

2.0354056994857928

What you should write then, instead of 90, is pi / 2.

You can alternatively set a Math node or an Attribute Math node to convert from radians to degrees and vice versa :

enter image description here

$\endgroup$
1
  • $\begingroup$ Indeed, the Point Rotate of a node from other nodes takes a value in radians. But this is not indicated. I fixed the problem on your recommendation by converting degrees to radians. $\endgroup$
    – Den Ya
    Commented Jun 6, 2021 at 10:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .