Description
Raytraced Intersecting Polyhedra studio: https://scratch.mit.edu/studios/30286682/ https://en.wikipedia.org/wiki/Compound_of_three_tetrahedra The Cartesian coordinates of a hexagonal antiprism, centered on the origin and having edge length 2, are: (±1, ±√3, √2) (±2, 0, √2) (±√3, ±1, −√2) (0, ±2, −√2) My Ray Tracing Projects studio: https://scratch.mit.edu/studios/26312219/ Ray Madness - a super raytracing & raycasting studio: https://scratch.mit.edu/studios/25849210/
Instructions
* Project runs much faster in TurboWarp: https://turbowarp.org/530291133?turbo * Else use Turbo Mode! (<Shift> key + Green Flag) Press <1> to view in best resolution (slow) Press <2> for medium resolution (slowish) Press <5> for low resolution (fast) like starting picture The 3 differently coloured tetrahedra intersect each other so that each triangle face is partially in front of and partially behind several other triangle faces. This makes the object hard to draw. It is easier to raytrace to each point on the screen and find the closest of the 12 triangles that make up the 3 tetrahedra compound and colour the point to match. Compound of 3 Tetrahedra: https://en.wikipedia.org/wiki/Compound_of_three_tetrahedra The Cartesian coordinates of a hexagonal antiprism, centered on the origin and having edge length 2, are: (±1, ±√3, √2) (±2, 0, √2) (±√3, ±1, −√2) (0, ±2, −√2) A "Ray Tracer" traces rays from the viewer through each pixel on the screen and calculates which object it hits first in 3D space (ie. which object is closest). The pixel is coloured with the colour of that object. For a ray to each (x,y) point on the screen, the code checks if and where the ray intersects each of the triangles that make up the 3 Tetrahedra Compound. The Z Intersect coordinate is calculated for each triangle intersection. The (x,y) point on the screen is coloured with the colour of the triangle with its Z Intersect coordinate closest to the viewer. My Ray Tracing Projects studio: https://scratch.mit.edu/studios/26312219/ Ray Madness - a super raytracing & raycasting studio: https://scratch.mit.edu/studios/25849210/
Project Details
- Visibility
- Visible
- Comments
- Enabled
More Cool Projects
-

New 3 (Update) Roblox {(Collabs)} talking tom and ben news
by elevatorkoneecodise
-

Dr. Nowhere
by generaljamesg
-

Seadtime Font V3.4
by BonesonScratch
-

my talking tom news remix-2 remix
by 6aqui20
-

AY in Roulette of Trapdoors! [ Remix 11 | 37 Players ]
by Julian4-301
-

RobloxStudio0 TSB Anomaly Retake
by Light12435
-

Brothers - JJS Engine
by HerosCodex
-

Beat up bonzi buddy remix remix remix
by everton123E
-

Pencil is NOT where we think she is - TPOT Theory
by Anonymous_Kittycat
-

be a hurricane
by stormandplanedude15
-

mom firend (tadc) the amazing digital circus
by Hathatgirlnews
-

(classic omega flowey)YOUR BEST NIGHTMARE (forsaken)
by se14va
-

The Scratch Movie 9
by BenBoy333
-

BFDI 25 Players Minigame
by PenBFDI
-

Scratch Drums!
by Slamas12
-

BLOCKY ✦ scrolling platformer creator by TimMcCool
by TimMcCool
-

TR!Last Bad Time Trio Phase 1 Fight Remastered
by Ink_Sans58
-

FNaF 2:Custom Night Remastered
by MineGabe123
-

Cakey Clicker! v2.4 #Games #all
by Clydedtoob
-

Cut the rop
by le-binoclard
-

Terrain Generator with path follower
by pizzataco213
-

The Death Lag Punishment
by ThunderbirdsJr
-

PS3 Startup Simulator with Samsung TV and YLOD Button
by TheJamesDTV
-

Jolly 2 OST - Paycheck
by redzebraPPS