Browse Search Popular Register Upload Rules User list Login:
Search:
Demonstration of e.normal

Image:
screenshot of the scene

Author: FRA32

Group: Default

Filesize: 61.77 kB

Date added: 2018-11-07

Rating: 5

Downloads: 477

Views: 628

Comments: 5

Ratings: 1

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

A demonstrative scene for XRay. It shows what e.normal represents during onLaserHit/onHitByLaser.

The purple laser orbit's the shape and relays the point of impact and e.normal via scene.my.variable to the green laser.
The green laser then positions itself on the point of impact and takes the form of the e.normal vector.
As one can quickly see, the laser always stands perpendicularly on the surface, exactly halfway between the purple laser before and after reflection.
It's length is always 1 due to the normal vector being, true to it's name, normalized. In fact, the mathematical term "normal" usually refers to a perpendicular vector on a line or surface, with length 1.

In summary, e.normal always represents the way "away" of the point of incident, be it laser hit or collision, always perpendicular to the surface in question.
Last edited at 2018/11/07 21:31:32 by FRA32
Please log in to rate this scene
edit
Similar scenes
Title: phun beta 4: pen demonstration
Rating: 5.5
Filesize: 14.11 kB
Downloads: 222
Comments: 9
Ratings: 6
Date added: 2008/06/27 16:20:03
Made with: Phun
no image found for this scene
Rating: rated 5.5
download
Title: Blood Pressure Demonstration
Rating: 4.75
Filesize: 28.35 kB
Downloads: 429
Comments: 0
Ratings: 4
Date added: 2008/07/01 05:17:14
Made with: Phun
Rating: rated 4.8
download
Title: eat script demonstration
Rating: 5
Filesize: 18.04 kB
Downloads: 377
Comments: 3
Ratings: 1
Date added: 2017/09/13 21:25:09
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Moteur HD simple demo
Rating: 5.625
Filesize: 1.45 MB
Downloads: 1841
Comments: 2
Ratings: 2
Date added: 2013/03/28 22:18:58
Made with: Algodoo v2.0.1
Rating: rated 5.6
download
Title: The Black Hole
Rating: 5
Filesize: 55.76 kB
Downloads: 341
Comments: 0
Ratings: 1
Date added: 2013/08/10 02:26:58
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: One way road: School Bus VS Bus
Rating: 5
Filesize: 32.21 kB
Downloads: 1072
Comments: 0
Ratings: 1
Date added: 2014/01/17 12:15:33
Made with: Algodoo v2.0.1
Rating: rated 5
download
Thanks very much, FRA32. I now have a pretty good understanding of what e.normal is and how it can be used in a scene. I've just added another useful tool to my Algodoo toolbox! :)
Thanks, this is exactly what I needed for...I forget:/
But great tool, indeed :tup:
Please make more scenes like this!
I would if I knew just what questions troubled the people here:lol:
If you possess questions requiring answers, ask them with my name somewhere in the comment(imagine it like a kind of "call") and I will come over and look at your problem ^^
I'm still confused:(
The scene shows the the value "e.normal", which is being provided during onCollide and onLaserHit/HitByLaser (the latter shown here). It is not super well known to thyme coders due to not being part of e.this and e.other.

e.normal is a 2D value, so it has a [x,y] format like pos and vel. The green laser shows you what e.normal looks like by pointing in the exact direction specified by the x and y partl. e.normal always stands perpendicular to the current surface, which is also the general definition of normals (being the opposite of tangents).