POV-Ray : Newsgroups : povray.advanced-users : 3d Surface Graphing (Isosurface i_dat3d?) Server Time
1 Nov 2024 13:19:07 EDT (-0400)
  3d Surface Graphing (Isosurface i_dat3d?) (Message 1 to 2 of 2)  
From: Phil Bender
Subject: 3d Surface Graphing (Isosurface i_dat3d?)
Date: 13 Feb 2002 04:32:29
Message: <3c6a32ad@news.povray.org>
Hi all,

I've been trying to figure out the best method to graph
an interpolated surface from data supplied in a text file.

The data is from a spreadsheet which contains the x/y coordinates and a 
'strength' value (see DATA1).

I've tried sorting the data and using bicubic patches for each 'grid' block 
with a program I'd written, but didn't know how to generate the correct 
surface normals - BTW I'm not that smart - (see OUTPUT1).

So I'm asking for help as to what is the best method to generate a 3d 
'graph' type surface with the height being based on the strength value 
from this data.

I'm not sure if Povray 3.5 supports i_dat3d, but it looks like the 
closest thing to what I want.

Anything, even just hints will suffice.

Thanks, Phil.


OUTPUT1:
// low:0.009324 high:0.029620
bicubic_patch {
  type 1 flatness 0 u_steps 6 v_steps 6,
<-2000,-2000,295.3688>,<-1900,-2000,295.2716>,<-1800,-2000,295.9529>,<-
1700,-2000,297.8091>,
<-2000,-1900,291.8088>,<-1900,-1900,298.2012>,<-1800,-1900,298.5937>,<-
1700,-1900,300.5633>,
<-2000,-1800,292.5120>,<-1900,-1800,294.2038>,<-1800,-1800,300.9586>,<-
1700,-1800,301.8496>,
<-2000,-1700,290.7233>,<-1900,-1700,295.7581>,<-1800,-1700,296.6356>,<-
1700,-1700,303.6387> 
}
... etc.


DATA1: 
Note that the grid coordinates are included (the first row being the x-
coords like -2000), and the last value for each row being the total 
'strength' value.
 
-2000,  -1900,  -1800,  -1700,  -1600,  -1500,  -1400,  -1300,  -1200,  -
1100,  -1000,   -900,  -800,   -700,   -600,   -500,   -400,   -300,   -
200,    200,    300,    400,    500,    600,   700,    800,    900,  1000,   
1100,   1200,   1300,   1400,    1500,   1600,    1700,   1800,    1900,    
2000,Total
-
2000,0.01013,0.01012,0.01019,0.01038,0.01064,0.01068,0.01089,0.01053,0.0105
4,0.01029,0.01029,0.01069,0.0109,0.01152,0.01122,0.01169,0.01131,0.01125,0.
01203,0.01099,0.01165,0.01239,0.01112,0.01088,0.0116,0.01093,0.01096,0.0107
,0.01091,0.01069,0.01049,0.01048,0.009962,0.01082,0.009964,0.01014,0.009648
,0.009304,0.408918
-
1900,0.009762,0.01042,0.01046,0.01066,0.01069,0.01061,0.01118,0.01068,0.010
81,0.01077,0.009781,0.01095,0.01095,0.01137,0.01141,0.01229,0.01127,0.01147
,0.01233,0.01119,0.01171,0.01248,0.01141,0.01117,0.01176,0.0111,0.01129,0.0
1112,0.01126,0.0106,0.01087,0.01018,0.0111,0.01025,0.01044,0.009928,0.00967
8,0.00978,0.415179
-
1800,0.009835,0.01001,0.0107,0.01079,0.01109,0.01122,0.01084,0.01141,0.0110
3,0.01104,0.01082,0.01083,0.01087,0.01145,0.01193,0.01257,0.01154,0.01156,0
.01259,0.01164,0.0117,0.01229,0.01174,0.01172,0.01178,0.0114,0.01121,0.0116
1,0.01083,0.01103,0.01048,0.01131,0.01072,0.01074,0.01022,0.01007,0.01008,0
.009762,0.422457
-
1700,0.009649,0.01017,0.01026,0.01097,0.01107,0.01145,0.01158,0.01163,0.011
59,0.01145,0.01138,0.01039,0.01155,0.01162,0.01241,0.01244,0.01194,0.01152,
0.0128,0.01202,0.01259,0.01199,0.01138,0.0123,0.01145,0.01169,0.01164,0.011
83,0.01125,0.01095,0.0114,0.01126,0.01103,0.01051,0.01049,0.01038,0.0102,0.
0102,0.430429
.... etc.


Post a reply to this message

From: Jérôme Grimbert
Subject: Re: 3d Surface Graphing (Isosurface i_dat3d?)
Date: 13 Feb 2002 05:40:36
Message: <3C6A42AD.4239C712@atosorigin.com>
Phil Bender wrote:
> 
> So I'm asking for help as to what is the best method to generate a 3d
> 'graph' type surface with the height being based on the strength value
> from this data.

Why do you want bicubic patch where a simple mesh should do.

You could also have a look at height_field, but your data are
not suitable for this (your grid is unregular).

-- 
Non Sine Numine
http://grimbert.cjb.net/
Puis, s'il advient d'un peu triompher, par hasard,






Post a reply to this message

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