POV-Ray : Newsgroups : povray.advanced-users : mesh&nurbs question... Server Time
28 Jul 2024 12:33:28 EDT (-0400)
  mesh&nurbs question... (Message 1 to 2 of 2)  
From: LEO BOLOGNA
Subject: mesh&nurbs question...
Date: 4 May 2006 10:00:01
Message: <web.445a0800e57eb53272071f7b0@news.povray.org>
Hello everybody,

I need to convert a NURBS in a mesh format...
My problem is that my NURBS is modeled and stored using a tool (called
xcmodel) developed and used in my university...
in this file are specified: surface degrees (2,1), the control net dimension
(10 x 4), the knot partition dimension (13 x 6) and finally the coordinates
of every control point and knot...for every control point is specifed the
weigth also..
How should I use these informations to obtain a mesh format recognized by
povray?

Thanks,
Leo



I post the content of my nurbs file:

DEGREE_U_V
       2        1
N.C.P._U_V
       10        4
KNOTS_U_V
       13        6
COORD.C.P.(X,Y,Z,W)
0.000000e+00 -4.519998e-01 0.000000e+00 1.000000e+00
-2.200000e+00 -1.200000e+00 0.000000e+00 1.000000e+00
-2.200000e+00 -1.200000e+00 -1.099995e-01 1.000000e+00
0.000000e+00 -4.519998e-01 -1.100000e-01 1.000000e+00
0.000000e+00 -4.519998e-01 0.000000e+00 1.000000e+00
2.200000e+00 -1.200000e+00 0.000000e+00 1.000000e+00
2.200000e+00 -1.200000e+00 -1.100000e-01 1.000000e+00
0.000000e+00 -4.519998e-01 -1.100000e-01 1.000000e+00
0.000000e+00 -4.519998e-01 0.000000e+00 1.000000e+00
2.200000e+00 -1.200000e+00 0.000000e+00 1.000000e+00
2.200000e+00 -1.200000e+00 -1.100000e-01 1.000000e+00
0.000000e+00 -4.519998e-01 -1.100000e-01 1.000000e+00
0.000000e+00 -4.519998e-01 0.000000e+00 1.000000e+00
2.200000e+00 1.199999e-01 0.000000e+00 1.000000e+00
2.200000e+00 1.199999e-01 -1.100000e-01 1.000000e+00
0.000000e+00 -4.519998e-01 -1.100000e-01 1.000000e+00
0.000000e+00 -4.519998e-01 0.000000e+00 1.000000e+00
2.200000e+00 1.199999e-01 0.000000e+00 1.000000e+00
2.200000e+00 1.199999e-01 -1.100000e-01 1.000000e+00
0.000000e+00 -4.519998e-01 -1.100000e-01 1.000000e+00
0.000000e+00 -4.519998e-01 0.000000e+00 1.000000e+00
3.278255e-08 5.599999e-01 0.000000e+00 1.000000e+00
3.278255e-08 5.599999e-01 -1.100000e-01 1.000000e+00
0.000000e+00 -4.519998e-01 -1.100000e-01 1.000000e+00
0.000000e+00 -4.519998e-01 0.000000e+00 1.000000e+00
-6.600000e-01 -3.200002e-01 0.000000e+00 1.000000e+00
-6.600000e-01 -3.200002e-01 -1.100000e-01 1.000000e+00
0.000000e+00 -4.519998e-01 -1.100000e-01 1.000000e+00
0.000000e+00 -4.519998e-01 0.000000e+00 1.000000e+00
-2.200000e+00 -3.200002e-01 0.000000e+00 1.000000e+00
-2.200000e+00 -3.200002e-01 -1.099998e-01 1.000000e+00
0.000000e+00 -4.519998e-01 -1.100000e-01 1.000000e+00
0.000000e+00 -4.519998e-01 0.000000e+00 1.000000e+00
-2.200000e+00 -3.200002e-01 0.000000e+00 1.000000e+00
-2.200000e+00 -3.200002e-01 -1.099998e-01 1.000000e+00
0.000000e+00 -4.519998e-01 -1.100000e-01 1.000000e+00
0.000000e+00 -4.519998e-01 0.000000e+00 1.000000e+00
-2.200000e+00 -1.200000e+00 0.000000e+00 1.000000e+00
-2.200000e+00 -1.200000e+00 -1.099995e-01 1.000000e+00
0.000000e+00 -4.519998e-01 -1.100000e-01 1.000000e+00
KNOTS_U
0.000000e+00
0.000000e+00
0.000000e+00
1.250000e-01
2.500000e-01
3.750000e-01
5.000000e-01
6.250000e-01
7.500000e-01
8.750000e-01
1.000000e+00
1.000000e+00
1.000000e+00
KNOTS_V
0.000000e+00
0.000000e+00
3.333333e-01
6.666667e-01
1.000000e+00
1.000000e+00


Post a reply to this message

From: Alain
Subject: Re: mesh&nurbs question...
Date: 5 May 2006 06:05:47
Message: <445b237b$1@news.povray.org>
LEO_BOLOGNA nous apporta ses lumieres en ce 04/05/2006 09:56:
> Hello everybody,
> 
> I need to convert a NURBS in a mesh format...
> My problem is that my NURBS is modeled and stored using a tool (called
> xcmodel) developed and used in my university...
> in this file are specified: surface degrees (2,1), the control net dimension
> (10 x 4), the knot partition dimension (13 x 6) and finally the coordinates
> of every control point and knot...for every control point is specifed the
> weigth also..
> How should I use these informations to obtain a mesh format recognized by
> povray?
> 
> Thanks,
> Leo
> 
> 
> 
> I post the content of my nurbs file:
> 
> DEGREE_U_V
>        2        1
> N.C.P._U_V
>        10        4
> KNOTS_U_V
>        13        6
> COORD.C.P.(X,Y,Z,W)
> 0.000000e+00 -4.519998e-01 0.000000e+00 1.000000e+00
> -2.200000e+00 -1.200000e+00 0.000000e+00 1.000000e+00
> -2.200000e+00 -1.200000e+00 -1.099995e-01 1.000000e+00
> 0.000000e+00 -4.519998e-01 -1.100000e-01 1.000000e+00
> 0.000000e+00 -4.519998e-01 0.000000e+00 1.000000e+00
> 2.200000e+00 -1.200000e+00 0.000000e+00 1.000000e+00
> 2.200000e+00 -1.200000e+00 -1.100000e-01 1.000000e+00
> 0.000000e+00 -4.519998e-01 -1.100000e-01 1.000000e+00
> 0.000000e+00 -4.519998e-01 0.000000e+00 1.000000e+00
> 2.200000e+00 -1.200000e+00 0.000000e+00 1.000000e+00
> 2.200000e+00 -1.200000e+00 -1.100000e-01 1.000000e+00
> 0.000000e+00 -4.519998e-01 -1.100000e-01 1.000000e+00
> 0.000000e+00 -4.519998e-01 0.000000e+00 1.000000e+00
> 2.200000e+00 1.199999e-01 0.000000e+00 1.000000e+00
> 2.200000e+00 1.199999e-01 -1.100000e-01 1.000000e+00
> 0.000000e+00 -4.519998e-01 -1.100000e-01 1.000000e+00
> 0.000000e+00 -4.519998e-01 0.000000e+00 1.000000e+00
> 2.200000e+00 1.199999e-01 0.000000e+00 1.000000e+00
> 2.200000e+00 1.199999e-01 -1.100000e-01 1.000000e+00
> 0.000000e+00 -4.519998e-01 -1.100000e-01 1.000000e+00
> 0.000000e+00 -4.519998e-01 0.000000e+00 1.000000e+00
> 3.278255e-08 5.599999e-01 0.000000e+00 1.000000e+00
> 3.278255e-08 5.599999e-01 -1.100000e-01 1.000000e+00
> 0.000000e+00 -4.519998e-01 -1.100000e-01 1.000000e+00
> 0.000000e+00 -4.519998e-01 0.000000e+00 1.000000e+00
> -6.600000e-01 -3.200002e-01 0.000000e+00 1.000000e+00
> -6.600000e-01 -3.200002e-01 -1.100000e-01 1.000000e+00
> 0.000000e+00 -4.519998e-01 -1.100000e-01 1.000000e+00
> 0.000000e+00 -4.519998e-01 0.000000e+00 1.000000e+00
> -2.200000e+00 -3.200002e-01 0.000000e+00 1.000000e+00
> -2.200000e+00 -3.200002e-01 -1.099998e-01 1.000000e+00
> 0.000000e+00 -4.519998e-01 -1.100000e-01 1.000000e+00
> 0.000000e+00 -4.519998e-01 0.000000e+00 1.000000e+00
> -2.200000e+00 -3.200002e-01 0.000000e+00 1.000000e+00
> -2.200000e+00 -3.200002e-01 -1.099998e-01 1.000000e+00
> 0.000000e+00 -4.519998e-01 -1.100000e-01 1.000000e+00
> 0.000000e+00 -4.519998e-01 0.000000e+00 1.000000e+00
> -2.200000e+00 -1.200000e+00 0.000000e+00 1.000000e+00
> -2.200000e+00 -1.200000e+00 -1.099995e-01 1.000000e+00
> 0.000000e+00 -4.519998e-01 -1.100000e-01 1.000000e+00
> KNOTS_U
> 0.000000e+00
> 0.000000e+00
> 0.000000e+00
> 1.250000e-01
> 2.500000e-01
> 3.750000e-01
> 5.000000e-01
> 6.250000e-01
> 7.500000e-01
> 8.750000e-01
> 1.000000e+00
> 1.000000e+00
> 1.000000e+00
> KNOTS_V
> 0.000000e+00
> 0.000000e+00
> 3.333333e-01
> 6.666667e-01
> 1.000000e+00
> 1.000000e+00
> 
> 
You may get by by converting your data into a collection of bicubics patches. The
trick is to 
correctly assign each knots and control points to the correct parts of the POV-Ray's
bicubic patch.

-- 
Alain
-------------------------------------------------
Feminism: Men are shit.


Post a reply to this message

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