POV-Ray : Newsgroups : povray.binaries.images : meshifying a point cloud Server Time
1 Jul 2024 01:19:51 EDT (-0400)
  meshifying a point cloud (Message 1 to 2 of 2)  
From: Anthony D  Baye
Subject: meshifying a point cloud
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


 

From: Anthony D  Baye
Subject: Re: meshifying a point cloud
Date: 8 Dec 2014 03:25:01
Message: <web.548560041f5125a31538d4890@news.povray.org>
"Anthony D. Baye" <Sha### [at] spamnomorehotmailcom> wrote:
> 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)

this should be #for(T,0,360,degrees(dS/R))

that's what I get for typing it from memory while I'm tired.

Regards,
A.D.B.


Post a reply to this message

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