Author Topic: Using VISIO as a tool for POV-Ray  (Read 2395 times)

0 Members and 1 Guest are viewing this topic.

Bald Eagle

  • Jr. Member
  • **
  • Posts: 57
Using VISIO as a tool for POV-Ray
« on: November 20, 2015, 01:55:18 PM »
Hi all,
I didn't know where to put this, but this seemed to be as good a place as any.

I frequently use VISIO to lay-out projects to scale, and having coordinates and sizes really helps a lot when I'm trying to design the truly 3-dimensional objects in a POV-Ray scene.

If you're not familiar with POV-Ray, it's a raytracing program that allows you to define objects in space, add textures, lighting, reflections, shadows - and generate detailed and potentially photorealistic images.
Objects can also be programmatically altered according to a "clock" variable in order to generate a series of images that can be stitched together into animations.   Indeed there have been people who have made whole movies using POV-Ray!
www.dimensions-math.org/
www.chaos-math.org/

While there are graphical aids for assisting in creating the scene file, a lot of it (or all of it) is command-line / code.

To give you an idea, here's my most recent, and most ambitious project to date, that I worked on for TINA CHeP's [www.tc-rtc.co.uk/] raytracing competition.
http://postimg.org/image/dj3r5v5np/

The overall scene, the architectural features, the furniture, and innumerable little bits were drawn/traced/measured/sketched in VISIO so that I could get the coordinates for the 3D objects right, and rapidly generate things like splines or furniture pieces.

As one can imagine, I ran into a few challenges while doing all of this (it took me about 3 months) and so I'm just going to post a lot of interrelated questions here rather than start a whole slew of independent threads.

1.  I'm often frustrated by the behaviour of the standard VISIO stencil shapes due to the bounding boxes.  Simple things like hexagons and pentagons "ought" to have their bounding boxes centered at the geometric center of the shape.  (different types of centers, such as for triangles - or foci of ellipses would be useful as well)
1a.  Sizing of these shapes can be frustrating as well - it would be useful to be able to designate the size of an attribute - a side of the polygon, or the distance across opposite vertices of a hexagon and have the whole shape follow along.

2.  Connecting shapes can be frustrating as well.   Often I will want to "sprout" a shape from a face of another shape - the equivalent of rotating a shape and aligning it edge-to-edge so that the edges are colinear.  I come up with creative ways to add "alignment lines", align shapes, and then delete the lines.   Slow and painful.
[1a + 2]. It would also be helpful to be able to create a shape with a side equal to the length of the side of another shape so that the vertices would align.
2a.  Is there a way to move a shape over to a line/connector and have it glue to the line rather than the other way around?  This would be SUPER helpful.

3.  ANGLES.  I do a lot of "mechanical drawing" and geometry in VISIO, and it would be helpful if the angles played nice.  VISIO has the annoying habit of reevaluating my angles when I input a value.
3a.  Is there a way to change what the default orientation of the page is, in terms of "where" zero is?  So, for example, if I drew a circle in the center of the page, could I "force" VISIO to use the bottom of the circle as 0 degrees?
3b.   Is there a way to have VISIO use the center of the page, or any given point I select as the "origin"?

I'd like to develop some tools to make some of my tracing / translation tasks easier and faster.
Can I generate a multi-node line and get a text listing of the x,y coordinates of all the nodes?  Like a spline?
Even better would be a way to "wrap" that listing in some code and export it to a file for use in POV-Ray.
Connecting the centers of a lot of circles with line segments and getting a list of x,y,radius would be a huge help to generate "sphere sweeps" such as I used for the gold furniture.  That took forever to draw, read, and type by hand.

Can VISIO "shell-out" and run POV-Ray using a file generated by VISIO as input?

What sort of image-processing capabilities does VISIO have?  Can I take a silhouette image and "edge-find" in order to outline it, generate a list of coordinates, or anything like that?  If I have to trace by hand, can I make an image I've inserted into a VISIO document "unselectable" so that I don't start grabbing it and dragging it around by accident?

I'm interested in learning how to create macros and VBA code to automate some of these tasks, and build new tools.
I realize there's a LOT of stuff here, and I probably have more   ;)   But I'm always looking to learn new skills and contribute in the process.

Thanks so much to anyone who can give me some hints, links, food for thought, or any other assistance.
I can post some files and links to illustrate some of the tasks and processes that I've used.