WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   data display (https://forum.worldviz.com/showthread.php?t=504)

kgarr 02-07-2006 10:41 AM

data display
 
Can Vizard be used to display scientific data. For example I would like to pass in a 2D matrix of values, and have it displayed as a colored surface or as a 3D plot. Also, if possible, can vizard change this object while the world is running

farshizzo 02-07-2006 04:51 PM

Hi,

Yes, Vizard should be able to do this through the use of On-The-Fly objects. They allow you to create 3D geometry by specifying each 3D vertex manually. Once the object is created you can modify existing vertices. If you provide more detail of what you are doing I could supply you with a sample script.

kgarr 02-07-2006 07:34 PM

What I would like to be able to do is have a set of X and Y coordinates, and then have a 2D matrix of values for the Z axis, to create a 3D surface plot.

I would also like to be able to create a cylinder, where the 2D matrix corresponds to the diameter of the cylinder at points along and around the cylinder. The result being a tube that is smooth at some points, and "spiky" at others.

The data can be static, but if it can be manipulated in the running world, that would be great. I am hoping to be able to skip the middle step of coverting our data to another format to be able to import into Vizard.

The basic reason I am asking this, is because we use VR manly for scientific visualization. The software we are using now does these surfaces very easily, but lacks in navigation, manipulation and event triggering, among other things. If Vizard can prove to be a tool for displaying the scientific data we need, it will be a much greater asset than our current software.

farshizzo 02-08-2006 11:07 AM

1 Attachment(s)
Hi,

I've created an addon module to make it easy to create height fields. The attached zip file contains the modules (kgarr.py, HeightField.dlc) and a test script (testHeightField.py). I've commented the test script to explain what each command does. Let me know if this isn't what you wanted.

I didn't implement the cylinder because I'm still not clear what it is supposed to look like. Do you have an image or a sample file?

kgarr 02-08-2006 01:03 PM

Thanks, as soon as I get a sample of the cylinder, I will send it over.

One other question. Is it possible to apply a color map to the height values? something like this.

http://users.rowan.edu/~garris37/graph.jpg

It does not have to be exactly like that, but something simular.

farshizzo 02-08-2006 02:59 PM

1 Attachment(s)
Hi,

I've attached a modified version of the addon module that allows setting a color map. The sample script shows how to use this, it also displays a wireframe version of the heightfield over the colored version.

kgarr 02-08-2006 05:52 PM

1 Attachment(s)
is it easy to get the data from a outside source, like the 50x50 CSV file attached.

farshizzo 02-09-2006 09:18 AM

If this isn't easy, then I don't know what is ;)
Code:

import csv
height = [ [float(val) for val in row] for row in csv.reader(file('data.txt','rUb')) ]


kgarr 02-09-2006 11:14 AM

Thanks Again!

Is it easy to map the color to the height of the surface, like in the picture above.

For example, the highest points have an RGB value of 1 0 0 and the lowest points have a value of 0 0 0, any height between has a value between those.

kgarr 02-09-2006 11:44 AM

here are some examples of the cylinder

http://users.rowan.edu/~garris37/vGeoImage1.jpg

http://users.rowan.edu/~garris37/vGeoImage2.jpg

http://users.rowan.edu/~garris37/vGeoImage3.jpg

the radius comes from a 2D matrix, one dimension being the points around the cylinder, the other being the points along the cylinder.

farshizzo 02-09-2006 11:54 AM

1 Attachment(s)
Hi,

I've attached a new version of the test script that generates colors based on the height.


All times are GMT -7. The time now is 12:41 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC