A cone with radius 6 and height 8 is sitting on a table. A spotlight with a cylindrical beam of radius 3 is shining directly at the cone. The beam is parallel to the surface of the table and the bottom of the beam just touches the table. The cone just barely blocks the entire light beam.
What is the illuminated area?
To find uniformly distributed points on the cone, the "number" of points along any level should be linearly related to the vertical distance from the level of the vertex, and then, along a chosen level, any part of the circumference should be equally likely.
Randomly choose a distance from the apex. Since the height is 8, if a random number from 0 to 1 is greater than 1/8 the level (distance from the top level), discard that choice; use only those random numbers less than 1/8 distance from top level.
Once a good level is found, choose a random point on the semicircumference:
The radius, r, of the circle and its semicircle is 6/8 = 3/4 of the distance chosen.
The circumference of the circle is 2*pi*r, and of the semicircle is pi*r
The angle, measured from the back slant element of the cone along the semicircle, is rand*pi radians where rand is a random number from 0 to 1, as its length is rand*r*pi.
The y coordinate (if beam is parallel to the x-axis) is r times the cosine of that angle.
The z coordinate of the point is 8 minus the distance from apex level.
If the y and z coordinates are within 3 units of z=3, y=0, you have a hit, otherwise it's a miss. Take the fraction of hits over (hits plus misses) of the total lateral area of the semicone, and that is your area. The lateral area of the full cone is pi*R*(sqrt(H^2+R^2)), so of the semicone is half of that.
area=hit/(hit+miss) * semicone
added hundreds of millions:
Edited on November 14, 2021, 11:35 am
Posted by Charlie
on 2021-11-14 11:24:44