Client Graphics Normal

Client Graphics Normal

gerrardhickson
Collaborator Collaborator
309 Views
3 Replies
Message 1 of 4

Client Graphics Normal

gerrardhickson
Collaborator
Collaborator

Hi All,


In the help file under "Client Graphics - Triangle API Sample " There is some sample code that creates a cylinder. Near the end of that sample, the code defines and assigns a normal for the client graphics 'surface'. What is the purpose of this? I've run the code without the normal, and it appears to do what I want. Are there cases when defining the normal is important?

 

Thanks

0 Likes
310 Views
3 Replies
Replies (3)
Message 2 of 4

FINET_Laurent
Advisor
Advisor

Hi @gerrardhickson,

 

It is the same for workplanes. For instance here we have a plane that is orange :

FINET_Laurent_0-1692175731315.png

If I look the other side of the workplane, it will be blue.

Now I can right click on it and select "Invert normal" :

FINET_Laurent_1-1692175796855.png

And now the colors are swapped : 

FINET_Laurent_2-1692175853377.png

Here is an explanation of what the normal of a surface is. The swap we did is simply defining where the arrow is pointing (two solutions)

FINET_Laurent_3-1692175921745.png

 

Kind regard,

FINET L.

 

If this post solved your question, please kindly mark it as "Solution"

If this post helped out in any way to solve your question, please drop a "Like"

@LinkedIn     @JohnCockerill

0 Likes
Message 3 of 4

gerrardhickson
Collaborator
Collaborator

@FINET_Laurent , yeah I understand what a normal is in the context of planes and why you might want to control them in for a work plane. But those reasons don't seem to apply to client graphics. E.g. you can't interact with client graphics the same way that you can with a work plane.

0 Likes
Message 4 of 4

FINET_Laurent
Advisor
Advisor

@gerrardhickson

 

The normal is often used in 3D computer graphics (notice the singular, as only one normal will be defined) to determine a surface's orientation toward a light source for flat shading, or the orientation of each of the surface's corners (vertices) to mimic a curved surface with Phong shading.

 

The rangebox appear non-shaded on my end if I remove those lines.

FINET_Laurent_0-1692177319931.png

FINET_Laurent_1-1692177362967.png

 

Kind regards,

FINET L.

If this post solved your question, please kindly mark it as "Solution"

If this post helped out in any way to solve your question, please drop a "Like"

@LinkedIn     @JohnCockerill

0 Likes