POV-Ray : Newsgroups : povray.general : Calculating / read from file vertices in mesh2 instead of typing them in? : Re: Calculating / read from file vertices in mesh2 instead of typing them i= Server Time
28 Apr 2024 15:49:40 EDT (-0400)
  Re: Calculating / read from file vertices in mesh2 instead of typing them i=  
From: Bald Eagle
Date: 29 Aug 2016 08:20:01
Message: <web.57c427b1ef5390f8b488d9aa0@news.povray.org>
"defferl" <gro### [at] gmailcom> wrote:
> Hi there,
>
> I have to visualize 3d data as some kind of surface.

If the data isn't structured, then maybe just plot a sphere at every vertex -
adjust the radius until they overlap and form a "surface".

Likely though, your data is already just a mesh definition.
(probably the famous "Utah teapot" : https://en.wikipedia.org/wiki/Utah_teapot )

You could probably just edit your file and save it as an .inc file, and render
the mesh directly,

> Is there no way to use #for loops or something else to "fill" the mesh2 with
> data directly?

or read the vertices in 3 at a time and use an array to store them,

or just make triangles in a mesh{} inside of your #read loop.
Look up #read and other file comands in the docs and how to use a while() loop
to read until EOF.

http://news.povray.org/povray.newusers/thread/%3Cweb.56cef0b1bc80f3839e6517f30@news.povray.org%3E/?mtop=406315&moff=1

http://news.povray.org/povray.binaries.scene-files/thread/%3Cweb.56d702f78f8162b55e7df57c0@news.povray.org%3E/


Post a reply to this message

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