Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 1
    $\begingroup$ Dan, I've added an image describing my expectation as an "answer". $\endgroup$ Commented Jun 29, 2017 at 16:28
  • 1
    $\begingroup$ You probably want to search for CSG (Constructive Solid Geometry) and Stencils. For example, this usenix.org/legacy/events/usenix05/tech/freenix/full_papers/… might allow you to achieve the desired results. Similarly, perhaps look at opencsg.org ? Actually, I might add this as a possible answer if no other answers appear $\endgroup$ Commented Jun 29, 2017 at 16:43
  • 1
    $\begingroup$ Thanks! In fact, I was reading that paper last night, but was hoping that OpenGL would have provided a way of accomplishing this with just basic stencil functions. It looks like quite an involved task! $\endgroup$ Commented Jun 29, 2017 at 16:50
  • 1
    $\begingroup$ Simon, one of the issues that I'd have with using the EXCELLENT CSG resources is that I'm accessing OpenGL via Visual Basic modules linked to an Excel spreadsheet from which I drive my application. I do not know whether or not the project files for MSVC6 will include extensions for VBA. $\endgroup$ Commented Jun 29, 2017 at 17:49
  • 1
    $\begingroup$ I´d treat the cylinder as a "light source", putting its geometry as a shader uniform and test fragment position against the cylinder, clipping fragments inside. Not sure if it is feasible for you or even interesting but in case you or others are stuck I´m just saying there is a way :-) $\endgroup$ Commented Sep 13, 2017 at 18:08