0xDE ([info]11011110) wrote,
@ 2007-12-17 17:19:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
Entry tags:graph drawing, nauru graph, tools

3d rendering difficulty
Despite Muthu's kind words, I'm currently being very frustrated over my inability to produce a legible image of a 3d model I have in mind.

It's supposed to look something like the image below, which I mocked up in SketchUp (a program that seems very powerful but that I don't know how to use very well): a quincunx of cubes, with circular beams connecting the inner cube to each outer cube.



Only, each of the circular beams should pass through a different pair of opposite vertices of the inner cube, and should pass through the corresponding pair of opposite vertices of its outer cube. And each beam should have an equilateral triangle cross-section, aligned so that the triple of beam faces meets up smoothly with the triple of cube faces near each vertex the beam passes through (the alignment is different on each of the two semicircles forming the beam). The top and bottom faces of the inner cube should be smoothly connected via the beams to the top and bottom faces of each outer cube, while the side faces of the inner cube should be smoothly connected to the perpendicular side faces of the outer cubes. And the resulting six smoothly-connected sets of faces should be properly 3-colored.

The result, if you haven't guessed, is a symmetric geometric realization of the genus-four surface embedding of the Nauru graph that I discussed the other day; the graph vertices are the remaining cube vertices on the outer cubes, not passed through by any beam, while the graph edges follow the sharp edges of the cubes and beams. My 3d modeling skills in this or any other program just aren't sufficient to the task, though, and it looks nearly as sloppy as this when I try to make a 2d sketch of the 3d model instead. It's frustrating.

ETA, July 2008: done in POVray


(5 comments) - (Post a new comment)

POV-Ray?
(Anonymous)
2007-12-19 02:10 am UTC (link)
This looks like a relatively straightforward (though not necessarily quick and easy) construction for POV-Ray using simple geometric primitives from its scene description language. The only thing you'd miss out on would be the smooth transition between beam face and cube face, though with the coloring described that shouldn't be too glaring a problem. I'd probably make the beams from three lathe objects (you could use one, but it would be more difficult to color), though you could use a cylinder clipped or intersected by two cones. I suspect the easiest way to make the cube would be to start with a single cuboid and clip it with two others to "paint" the sides.

(Reply to this) (Thread)

Re: POV-Ray?
[info]11011110
2007-12-19 02:25 am UTC (link)
Yeah, that might work better. I've done a little bit of stuff in povray before and it wasn't too tedious.

The other approach I was thinking about this evening would be to make it out of paper: cubes are easy enough, and a triangle-cross-section beam just needs three arches of the approprate radii and lengths, which shouldn't be too difficult to calculate (it would be easier if the cross-section were oriented so that each beams was bilaterally symmetric, but they aren't). Make the cubes and beams separately, then attach them together. Again, the smooth joins would make this trickier but probably aren't necessary.

(Reply to this) (Parent)


[info]leonardo_m
2007-12-19 12:23 pm UTC (link)
POV-Ray may be tedious to build most complex scenes, especially organic-looking ones, but it's quite fitting to build mathematically-defined objects (like fractals, 3D shells, 3D sponges, recursive structures, knots, etc). I think there are Python scripts too to help setting a scene, you may take a look at them (but I think they aren't much refined).
That SketchUp looks quite nice. To obtain something like that you may need to use radiosity with POV-Ray.

(Reply to this) (Thread)


[info]11011110
2007-12-20 06:39 pm UTC (link)
Although the rendering in SketchUp is a lot more primitive, it does have the advantage of being able to quickly rotate a scene and view it from different perspectives. I wonder if there's some way of creating a scene programmatically in some format, importing it to SketchUp, choosing a perspective there, then exporting to something povray can render.

I don't know much about the 3d formats SketchUp can import, though: looks like .dwg, .dxf, .3ds, .dem, and .ddf. And the for-free version only exports to Google Earth, though it looks like you can pay for more formats.

(Reply to this) (Parent)(Thread)


[info]leonardo_m
2007-12-20 06:56 pm UTC (link)
If your problem is just finding the correct point of view of the object, then probably there are partially-free editors for POV-ray scenes that you may use. I presume the POV-ray file/scene format is common enough.

And if you can't find such editor, then you have the Python code still, that generates the 3D object (and saves it in POV-ray format). With that code I am sure there are some 3D graphics lib for Python that are interactive too. With that your Python script can save the final POV-ray scene only once you have interactively found the right POV. Python has bindings for almost everything under the sun ;-)

(Reply to this) (Parent)


(5 comments) - (Post a new comment)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…