POV-Ray : Newsgroups : povray.general : how to include a origin graph : If you want a pretty graph, just like Excel gives you: cheat! Server Time
30 Jul 2024 02:23:43 EDT (-0400)
  If you want a pretty graph, just like Excel gives you: cheat!  
From: TC
Date: 1 Dec 2009 16:27:26
Message: <4b158a3e@news.povray.org>
The easiest way is simply to cheat. There are several ways:

- Use PovRay to create the picture you would like to have, import the 
pov-picture as background into Excel. Combine your Excel-graph with 
pov-picture and enjoy.
- Use PovRay to create the picture you would like to have, use Excel to 
produce the prettily formatted graph, make a screenshot, combine screenshot 
with PovRay-scene using a program like Photoshop.

A more Pov-Ray way to cheat:

- Use Excel to produce the prettily formatted graph, create screenshot or 
print to bitmap, and use an image_map in PovRay to include the graph into 
your PovRay scene. Apply the image_map to a box-object or a sphere, if you 
are feeling artistic.

Include something like this into your PovRay scene (or google for "povray 
image_map"):

pigment
{ image_map
  { gif "myprettyexcelgraph.gif"
    map_type 1
  }
}

- Now, if you want just to render the graph, use the raw x,y coordinates as 
part of a sphere_sweep

  sphere_sweep {
    linear_spline
    42,
    <x1, y1, 0>, 1
    <x2,  y2, 0>, 1
    ....
    < x42, y42, 0>, 1
  }

Scale to size and include in your Pov-Scene. Enjoy.

However, you don't get all the trimmings this way, just the bare graph, no 
axes, no grids, no labels.

- If all this is not what you are looking for, try Inkscape. Inkscape does 
export to PovRay prism-objects and can import many different formats.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.