I’m creating a canvas with isometric blocks on it. What I want to do is cast a shadow from the blocks. I currently have a version of it working, but the shadow appears a lot longer than it should. I was wondering if there was any formula to work out how to cast a shadow properly.
What I would like is the shadow to be slightly shorter than the height.

(source: net84.net)
Regards
Peter
Formula?
Its trigonometry:
The light source vector is side
cof a triangle, your block theaside.Or the length of the shadow being
bor
PS this is predicated on the angle of a & b being 90 degrees, aka your block stands straight up. Otherwise you’ll need to use the angle between a & c and then use cos, sin and or tangent to figure the length of side b. I forget exactly, but you can ask here: https://math.stackexchange.com/
See this calculator: http://www.carbidedepot.com/formulas-trigright.asp