POV-Ray : Newsgroups : povray.binaries.images : meshifying a point cloud : meshifying a point cloud Server Time
2 Jul 2024 23:02:53 EDT (-0400)
  meshifying a point cloud  
From: Anthony D  Baye
Date: 8 Dec 2014 02:30:01
Message: <web.548552bd8de6babd1538d4890@news.povray.org>
I've been working on an object for a WIP, and I originally wanted to model it as
an isosurface.  I have thought of two different ways of describing the surface
unfortunately, one is far from precise and the other doesn't seem to translate
well when I make the calculations into functions.

#version 3.7;
#include "math.inc"

#default {
    pigment { rgb <0.07,0.37,0.75> }
    finish { ambient 0 }
    }

#local N = 6;
#local R0 = 2;
#local S = 2 * pow( sin(pi/(2*N)), 2 );
#local A = R0 - S;
#local r = 360 / P;
#local l = 90 - r/2;
#local dS = 0.0625;      // S = RT --> T = S/R  tf. dT = dS/R
#for(H,-2,2,0.03125)
    #for(T,0,360,1)
        #local p1 = R0 * sind(l + mod(T, r));
        #local p2 = p1 - A;
        #local R1 = R0 - p2/sind(l + mod(T, r));
        // I'm still trying to get a handle on the twist period.
        #local p3 = vrotate(<R1,H,0>, (T + H*degrees((2*pi/12)))*y));
        sphere { p3 0.015625 }
    #end
#end

I've attached an image below.

I've tried saving the points as a point cloud in stanford .ply format and
importing that into MeshLab where I can calculate the Delaunay Triangulation
and vertex normals.  It looks good in meshlab, but when I export it as an .obj
and import it into blender it looks all bulbous, like the normals are flipped.

I have no experience with mesh work, and I could use any suggestions.

Regards,
A.D.B.


Post a reply to this message


Attachments:
Download 'workshop4.png' (667 KB)

Preview of image 'workshop4.png'
workshop4.png


 

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