Andrew Davey
05-03-2004, 11:07 PM
Is there an easy way to implement shadows, i am only using lines to draw my objects, i.e. a collection of lines to implement a tree.
Also in my "world" i have a sun, i was wondring if i could use this sun as my light source, and if the sun moved the light source would also be different, this light source will hopefully be used to work out and draw the shadows.
This is what i guess the prog will have to know in order to draw the shadow.
1: The plane to draw on, i.e. y axis is 0
2: The angle of the sun
3: The position of the lines
The prog i guess will then work out the new length of the shadow depending on the suns angle in relation to the current line.
Am i thinking in the right way?? if so what do i have to do to implement this?
Remeber i am using nothing complex as my object just plain simple 3d lines.
Also in my "world" i have a sun, i was wondring if i could use this sun as my light source, and if the sun moved the light source would also be different, this light source will hopefully be used to work out and draw the shadows.
This is what i guess the prog will have to know in order to draw the shadow.
1: The plane to draw on, i.e. y axis is 0
2: The angle of the sun
3: The position of the lines
The prog i guess will then work out the new length of the shadow depending on the suns angle in relation to the current line.
Am i thinking in the right way?? if so what do i have to do to implement this?
Remeber i am using nothing complex as my object just plain simple 3d lines.