Some views or ideas required....
-
Hi all, here is some interesting problem.... the problem setup goes like this... a plane paper is placed on a table and a sphere is placed over it at some height and on that sphere at certain height a light was placed. Noow as we all know it produces a shadow on the paper which will be some what elliptical if the light is not on the center line of the sphere. In this condition if we assume the paper as a 2D image then how can we calculate the pixels tht are covered under the elliptical shadow ( or to put it in other way while scannin form top how can we decide whether a pixel falls under the shadow). any ideas ot thoughts are appreciated. thanks in advance, Suman
-
Hi all, here is some interesting problem.... the problem setup goes like this... a plane paper is placed on a table and a sphere is placed over it at some height and on that sphere at certain height a light was placed. Noow as we all know it produces a shadow on the paper which will be some what elliptical if the light is not on the center line of the sphere. In this condition if we assume the paper as a 2D image then how can we calculate the pixels tht are covered under the elliptical shadow ( or to put it in other way while scannin form top how can we decide whether a pixel falls under the shadow). any ideas ot thoughts are appreciated. thanks in advance, Suman
Google ray tracing. Or DirectX will do it for you, if that's all you need. Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
-
Hi all, here is some interesting problem.... the problem setup goes like this... a plane paper is placed on a table and a sphere is placed over it at some height and on that sphere at certain height a light was placed. Noow as we all know it produces a shadow on the paper which will be some what elliptical if the light is not on the center line of the sphere. In this condition if we assume the paper as a 2D image then how can we calculate the pixels tht are covered under the elliptical shadow ( or to put it in other way while scannin form top how can we decide whether a pixel falls under the shadow). any ideas ot thoughts are appreciated. thanks in advance, Suman
the shadow is the intersection of the plane of the paper and the cone whose apex is at the light and whose sides are tangent to the sphere. The distance from apex (light) to center of sphere is the hypotenuse of a triangle whose side opposite the apex angle is the radius of the sphere. This is enough to determine the cone.
-
the shadow is the intersection of the plane of the paper and the cone whose apex is at the light and whose sides are tangent to the sphere. The distance from apex (light) to center of sphere is the hypotenuse of a triangle whose side opposite the apex angle is the radius of the sphere. This is enough to determine the cone.
Hi Scott, yep u r right....i understood ur point. But the problem is how to tell whether a pixel lies in the shadow or not. I mean r there any techniques or approach to find it out. becos i was given a sphere of some radius and the height at which it is and the pixel at which the center of the sphere lies. and i have to figure out all the pixels covering under its shadow...and then i have to do some other calcualtins for those pixels... but first of all i have to find those pixels. hope i am clear to u. thanks in advance, Suman