POV-Ray : Newsgroups : povray.programming : Can someone patch POV so that you can output an isosurface as a wire frame? : Re: Can someone patch POV so that you can output an isosurface as a wire fr= Server Time
6 Oct 2024 16:14:22 EDT (-0400)
  Re: Can someone patch POV so that you can output an isosurface as a wire fr=  
From: Slime
Date: 7 Nov 2002 17:12:49
Message: <3dcae561$1@news.povray.org>
> Right! But there is no mesh! That's the problem. How do I get that mesh?
> There's only 2D pictures with POV turning it into something that looks
like
> a mesh.
>
> I'm talking about outputting a mesh. Remember what I said about turning
> isosurfaces into meshes.


To turn an image into a height field mesh, you must sample the image at each
pixel and interpret the color as a height value. Then you place triangles in
the correct places so that their vertices are at the heights of
corresponding pixels.

If you're writing the macro to sample the image, then you can do whatever
you want with the height values. You can wrap the image around a cylinder
shape if you want.

Turning an isosurface into a mesh is harder, as people have mentioned,
'cause you're trying to turn a 3D function into a 2D surface.

> Great... but is there a way to output a mesh?

You can cause a mesh to be parsed by using the mesh or mesh2 syntax, in this
case in conjunction with macros and while loops. If you want to output the
mesh so that you can read it in later, you can use the #fopen and #write and
#fclose directives. (All these are in the documentation.)

> There should be... and POV should read compressed mesh files without
having
> to go through a macro.

I'm not sure what you mean by "compressed mesh files." POV-Ray can read its
own mesh type. If you want to know why it doesn't read other types of meshes
(.obj for instance), check the documentation, it's somewhere in the FAQ
(section 9 i think).

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

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