ScratchData LogoScratchData
Back to sureornot's profile

Ray Disc Intersection

SUsureornot•Created May 16, 2021
Ray Disc Intersection
3
2
23 views
View on Scratch

Instructions

A test for Ray-Disc intersection: Slide Bar (Normal,x), (Normal,y), (Normal.z) E key : End Space Bar : Reset Use TurboWarp for faster response https://turbowarp.org/

Description

Disc Center: Q Disc Radius: r Normal: N (1) Plane determined by Point(Q)-Normal(N) Ray P = P0 + t*P1 Plane N・(P - Q) = 0 [N・(Po + t*P1 -Q)] = 0 Solution t = [N・(Q - P0)] / (P1・N) (p1・N) = 0 ray is parallel to the plane. if t<0 the plane is behind the eye point (2) Check intersection point lies inside the disc. (P-Q)・(P-Q) < r^2 or =r^2

Project Details

Project ID531125731
CreatedMay 16, 2021
Last ModifiedMay 30, 2021
SharedMay 29, 2021
Visibilityvisible
CommentsAllowed