How do I design a candle holder that casts a specific shadow?
March 21, 2022 2:24 PM   Subscribe

I would like to take a 3d model of a surface (the candle holder), and a 2d image of the shadows I want to cast (on another surface, of course, but for simplicity here, lets say the plane that the candle holder sits on), and then project (reverse project?) what shapes would need to be cut in the surface to achieve that result. Is this a thing? What is it called? What software would help with this?
posted by Nothing to Media & Arts (12 answers total) 1 user marked this as a favorite
 
I'm sure there will be better answers than mine. But, one could do it all in the forward direction in Blender. Place a camera facing the illuminated wall, make the model by hand, compare the result to an image, and iterate. When it's done, export the result as a DXF file or similar, which is then easy to convert to either drawings or send to a CNC shop to make. (Or, you could do the modeling in some other CAD software - the free version of Studio360 would probably work for this - and import to Blender to add lighting, check the results, then iterate.)

Doing it in reverse seems like it's a bit challenging, since the shapes you want don't include the direction the light is coming from when it arrives at the surface. There are lots of candle holders that would produce the same pattern. There's probably some smart way to make a computer monte carlo a solution. I don't know of any tools designed for it, and it sounds like many weeks of work for a talented programmer to make one. Do tell us about it, and ideally show it to us, when you're done. Sounds neat!
posted by eotvos at 3:11 PM on March 21, 2022 [1 favorite]


Response by poster: I figured a point light source would need to be specified, and with that and the requirement that the pattern be created by occlusion at the defined 2d surface of the holder, it could be relatively well constrained. Forgive me if I am using words imprecisely. I am myself a moderately talented programmer, and a few weeks of work would be worth it to me, but my experience is not in this area, so I would need resources to dig into.
posted by Nothing at 3:30 PM on March 21, 2022


I think it's confusing to refer to the -- uh, light stencil? -- as the "candle holder." It might be physically attached to the candle holder to maintain the spatial relationship between candle and projection surface, but it's a fundamentally different thing. If the [light stencil?] is too close to the light source then it won't work at all. The closer to the projection surface (and further from the candle) you put it, the crisper the image will be, because a candle is only sorta-kinda a point source.

The important bit of the 2-D projected image is the line at the border between light and dark. So, you have a line on a surface, a light source location (just a point in space), and a stencil plane between light source and projection surface. Construct a series of lines from the light source point to various points on the image line, and calculate where they pass through the stencil plane.

I'm pretty sure you could do this in Rhino, but I was only ever very slightly practiced with it, and that was a long time ago.
posted by jon1270 at 4:32 PM on March 21, 2022


...

I guess the stencil doesn't have to planar, but it's probably easier to model if it is.
posted by jon1270 at 4:48 PM on March 21, 2022


Best answer:
it could be relatively well constrained
Interesting. I think my previous comment was wrong, or at the least assumed more freedom in the design. If you assume the source of light is a single point (not entirely true for a candle, but not a terrible approximate if the holder is significantly bigger than the flame), and confine the shapes to a single, thin, well-defined surface, then I'd agree you could do it backwards pretty easily, probably in a lot less time.

I barely know anything about ray-tracing, though I've spent a lot of time talking to people who do it professionally. If everything is either opaque or open and there are no complicated optics, doing it by hand in reverse doesn't seem too bad. It's basically just assuming straight lines connect each part of the wall to the source and seeing where they intersect the holder.

My incredibly naive approach would be to take the wall with the intended projection and divide it into a fine grid, calculate an angle between each pixel and the lighted point source. Also divide the screen into a grid. Figure out where each ray from each grid point on the wall intersects the screen, and make that section of the screen either open or closed. It's a bunch of annoying geometry, but textbook stuff. Figuring out what to do when a wall pixel hits the boundary between screen pixels might be a challenge, but you can always make the grid squares so small that it doesn't matter if one or two are turned on.

(You could also probably do it analytically if your screen is a cylinder or other well-defined flat surface. It's basically a map projection. Maybe even a named one, if your surface isn't too weird.)
posted by eotvos at 4:53 PM on March 21, 2022 [2 favorites]


Best answer: You'd want to do a boolean difference (subtract one solid from another).

For example, let's say you're using a point source (like a candle).

1) I'd draw the shadow on a plane (the 'screen') in the above diagram.
2a) If you're using a candle, you'd want a point source, so create a solid extrusion converging onto the center of the light source. (In Rhino3d, this command is called ExtrudeCrvToPoint).
2b) If you're using sunlight, light is parallel, so create an simple extrusion.
3) Model the 3d candle
4) Subtract 2) from 3); in Rhino3d, this command is called BooleanDifference.

If I were doing this, I'd start experimentally first, by drilling a hole in an object, setting it up to a real-world candle, and getting some measurements, then bringing those measurements into a 3d modeling software.

You can probably do this in Blender, or in OpenScad, or in Fusion360, etc.

And if you want to get advanced, you can check out this 3d-printed digital sundial created with OpenSCAD.
posted by many more sunsets at 4:59 PM on March 21, 2022 [4 favorites]


Best answer: Related: 3D printed mirror array
posted by many more sunsets at 5:00 PM on March 21, 2022


Maybe I’m missing something but isn’t it the case that similar triangles say that the shape of the shadow of a planar shape is the shape itself, assuming both are contained in parallel planes?
posted by Gilgamesh's Chauffeur at 6:25 PM on March 21, 2022


Or is this actually a cylinder with the light source contained within it?
posted by Gilgamesh's Chauffeur at 6:27 PM on March 21, 2022 [1 favorite]


If the shadow you want is not too complicated, and the "candle holder" already exists, I'd be tempted to do a proof of concept using a pinboard and some string.
posted by Jobst at 7:29 AM on March 22, 2022


As Jobst says, before you go to all this trouble, it will probably be worth it to just mock something up and see if it's even possible to produce the effect you want. Since the object creating the shadow (the candle holder) will necessarily be close to the light source (the candle flame), it seems likely that the shadow won't be particularly sharp.
posted by slkinsey at 7:36 AM on March 22, 2022


Response by poster: I appreciate lateral thinking, but I'd prefer to stay focused on tools and techniques to perform this kind of projection (raytracing is a good thought, as is map projection which I have some familiarity with) from a light source through a mask onto a surface, ideally starting from the surface image and generating the appropriate mask.
posted by Nothing at 9:15 AM on March 22, 2022


« Older Ursula K. LeGuin work   |   What kind of (Magnolia?) tree is this (SF Bay Area... Newer »
This thread is closed to new comments.