Discussion:
Voxels from expression
(too old to reply)
Al Greynolds
2021-04-30 13:22:49 UTC
Permalink
Can the new voxels capability display an isosurface of an expression, i.e. a given function of x,y,z?

Al
Gavin Buxton
2021-04-30 14:08:51 UTC
Permalink
Post by Al Greynolds
Can the new voxels capability display an isosurface of an expression, i.e. a given function of x,y,z?
Al
Apparently so....

https://lwn.net/Articles/828761/

although I've not played around with it. Looks awesome though!
Al Greynolds
2021-04-30 15:40:34 UTC
Permalink
Post by Gavin Buxton
Post by Al Greynolds
Can the new voxels capability display an isosurface of an expression, i.e. a given function of x,y,z?
Al
Apparently so....
https://lwn.net/Articles/828761/
although I've not played around with it. Looks awesome though!
Here's what I'm trying to do:

R=1
L=8
n=2
h=3
m=3
f(x,y,z)=x**2+(y-h*(z/L)**m)**2-(R*(1-(z/L)**n))**2
set vgrid $wh size 100
set vxrange [-R:R]
set vyrange [-R:h+R]
set vzrange [0:L]
vfill ?
splot $wh w isosurface level 0

Why does vfill require a file or datablock as a source? Why can''t my function f be used as easily as plot and splot allow plotting expressions/functions instead of files or datablocks?

Al
Gavin Buxton
2021-05-01 14:02:11 UTC
Permalink
Post by Al Greynolds
Post by Gavin Buxton
Post by Al Greynolds
Can the new voxels capability display an isosurface of an expression, i.e. a given function of x,y,z?
Al
Apparently so....
https://lwn.net/Articles/828761/
although I've not played around with it. Looks awesome though!
R=1
L=8
n=2
h=3
m=3
f(x,y,z)=x**2+(y-h*(z/L)**m)**2-(R*(1-(z/L)**n))**2
set vgrid $wh size 100
set vxrange [-R:R]
set vyrange [-R:h+R]
set vzrange [0:L]
vfill ?
splot $wh w isosurface level 0
Why does vfill require a file or datablock as a source? Why can''t my function f be used as easily as plot and splot allow plotting expressions/functions instead of files or datablocks?
Al
Hopefully someone else can help, but you used to be able to set terminal as 'table' and output functions to a file. Assuming videos requires discrete points. Hopefully someone has more experience with voxels. Thanks for asking the question though, as I didn't this was a new feature!
Al Greynolds
2021-05-04 13:59:39 UTC
Permalink
OK I sort of got what i wanted, but had to begrudgingly resort to separately creating a file of point data for vfill. However, even though all inputs are symmetric about the x=0 plane, the resulting isosurface is not. I can provide the script and data files if anyones interested.

Al

Loading...