Commit ·
eebd130
1
Parent(s): 0741ce8
Add 7 vector field visualization cases (ABC, Bernard, twoswirls, crayfish, tornado, supernova100, rti-velocity_slices)
Browse files- main/{tornado/GS/gs_side_view.png → ABC/GS/abc_glyph.png} +2 -2
- main/{tornado/GS/tornado_gs.pvsm → ABC/GS/abc_glyph.pvsm} +2 -2
- main/ABC/GS/abc_glyph.py +122 -0
- main/ABC/data/abc.raw +3 -0
- main/ABC/data/abc.txt +1 -0
- main/ABC/task_description.txt +22 -0
- main/ABC/visualization_goals.txt +4 -0
- main/Bernard/GS/bernard_streamline.png +3 -0
- main/{tornado/GS/gs_diagonal_view.png → Bernard/GS/bernard_streamline.pvsm} +2 -2
- main/Bernard/GS/bernard_streamline.py +161 -0
- main/Bernard/data/bernard.raw +3 -0
- main/Bernard/data/bernard.txt +1 -0
- main/Bernard/task_description.txt +22 -0
- main/Bernard/visualization_goals.txt +4 -0
- main/{tornado/GS/gs_front_view.png → crayfish/GS/crayfish_streamline.png} +2 -2
- main/crayfish/GS/crayfish_streamline.pvsm +3 -0
- main/crayfish/GS/crayfish_streamline.py +150 -0
- main/crayfish/data/crayfish.raw +3 -0
- main/crayfish/data/crayfish.txt +1 -0
- main/crayfish/task_description.txt +25 -0
- main/crayfish/visualization_goals.txt +5 -0
- main/rti-velocity_slices/GS/rti-velocity_slices_gs.png +2 -2
- main/rti-velocity_slices/GS/rti-velocity_slices_gs.pvsm +2 -2
- main/rti-velocity_slices/GS/rti-velocity_slices_gs.py +8 -5
- main/rti-velocity_slices/visualization_goals.txt +4 -7
- main/supernova100/GS/supernova100_streamline.png +3 -0
- main/supernova100/GS/supernova100_streamline.pvsm +3 -0
- main/supernova100/GS/supernova100_streamline.py +236 -0
- main/supernova100/data/supernova100.raw +3 -0
- main/supernova100/data/supernova100.txt +1 -0
- main/supernova100/task_description.txt +27 -0
- main/supernova100/visualization_goals.txt +4 -0
- main/tornado/.DS_Store +0 -0
- main/tornado/GS/.DS_Store +0 -0
- main/tornado/GS/tornado_streamline.png +3 -0
- main/tornado/GS/tornado_streamline.pvsm +3 -0
- main/tornado/GS/tornado_streamline.py +350 -0
- main/tornado/data/{tornado_64x64x64_float32_scalar3.raw → tornado.raw} +0 -0
- main/tornado/data/tornado.txt +0 -0
- main/tornado/task_description.txt +10 -10
- main/tornado/visualization_goals.txt +4 -7
- main/twoswirls/GS/twoswirls_streamsurface.png +3 -0
- main/twoswirls/GS/twoswirls_streamsurface.pvsm +3 -0
- main/twoswirls/GS/twoswirls_streamsurface.py +306 -0
- main/twoswirls/data/twoswirls.raw +3 -0
- main/twoswirls/data/twoswirls.txt +2 -0
- main/twoswirls/task_description.txt +23 -0
- main/twoswirls/visualization_goals.txt +5 -0
main/{tornado/GS/gs_side_view.png → ABC/GS/abc_glyph.png}
RENAMED
|
File without changes
|
main/{tornado/GS/tornado_gs.pvsm → ABC/GS/abc_glyph.pvsm}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bd06c014e8cb65fd51ee191eeb970a29dddafc763dfb63e0d546b4d12d4dc53f
|
| 3 |
+
size 351344
|
main/ABC/GS/abc_glyph.py
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from paraview.simple import *
|
| 2 |
+
|
| 3 |
+
# ============= Configuration =============
|
| 4 |
+
INPUT_FILE = '/home/dullpigeon/Desktop/SciVisAgentTask/ABC/abc.raw'
|
| 5 |
+
OUTPUT_IMAGE = '/home/dullpigeon/Desktop/SciVisAgentTask/ABC/abc_glyph.png'
|
| 6 |
+
OUTPUT_STATE = '/home/dullpigeon/Desktop/SciVisAgentTask/ABC/abc_glyph.pvsm'
|
| 7 |
+
IMAGE_SIZE = [1024, 1024]
|
| 8 |
+
|
| 9 |
+
# ============= Load Data =============
|
| 10 |
+
# ABC flow: 128x128x128, float32, 3 components (vector field)
|
| 11 |
+
reader = ImageReader(FileNames=[INPUT_FILE])
|
| 12 |
+
reader.DataScalarType = 'float'
|
| 13 |
+
reader.DataByteOrder = 'LittleEndian'
|
| 14 |
+
reader.DataExtent = [0, 127, 0, 127, 0, 127]
|
| 15 |
+
reader.FileDimensionality = 3
|
| 16 |
+
reader.NumberOfScalarComponents = 3
|
| 17 |
+
reader.UpdatePipeline()
|
| 18 |
+
|
| 19 |
+
# ============= Get Data Info =============
|
| 20 |
+
bounds = reader.GetDataInformation().GetBounds()
|
| 21 |
+
center = [(bounds[0]+bounds[1])/2, (bounds[2]+bounds[3])/2, (bounds[4]+bounds[5])/2]
|
| 22 |
+
print(f"Bounds: {bounds}")
|
| 23 |
+
print(f"Center: {center}")
|
| 24 |
+
|
| 25 |
+
pd = reader.PointData
|
| 26 |
+
array_name = pd.GetArray(0).Name
|
| 27 |
+
print(f"Vector array: '{array_name}', components={pd.GetArray(0).GetNumberOfComponents()}")
|
| 28 |
+
|
| 29 |
+
# ============= Streamlines =============
|
| 30 |
+
tracer = StreamTracer(Input=reader, SeedType='Point Cloud')
|
| 31 |
+
tracer.Vectors = ['POINTS', array_name]
|
| 32 |
+
tracer.IntegrationDirection = 'BOTH'
|
| 33 |
+
tracer.MaximumStreamlineLength = 150.0
|
| 34 |
+
tracer.SeedType.Center = [73.77097622534964, 63.246234492256846, 71.65486325831273]
|
| 35 |
+
tracer.SeedType.NumberOfPoints = 150
|
| 36 |
+
tracer.SeedType.Radius = 75.0
|
| 37 |
+
tracer.UpdatePipeline()
|
| 38 |
+
|
| 39 |
+
# ============= Tubes =============
|
| 40 |
+
tube = Tube(Input=tracer)
|
| 41 |
+
tube.Radius = 0.5715767492484302
|
| 42 |
+
tube.NumberofSides = 12
|
| 43 |
+
tube.Capping = 1
|
| 44 |
+
tube.UpdatePipeline()
|
| 45 |
+
|
| 46 |
+
# ============= Create View =============
|
| 47 |
+
renderView = CreateView('RenderView')
|
| 48 |
+
renderView.ViewSize = IMAGE_SIZE
|
| 49 |
+
renderView.Background = [0.1, 0.1, 0.15]
|
| 50 |
+
|
| 51 |
+
layout = CreateLayout(name='Layout')
|
| 52 |
+
layout.AssignView(0, renderView)
|
| 53 |
+
|
| 54 |
+
# ============= Display Reader as Outline =============
|
| 55 |
+
readerDisplay = Show(reader, renderView)
|
| 56 |
+
readerDisplay.Representation = 'Outline'
|
| 57 |
+
ColorBy(readerDisplay, None)
|
| 58 |
+
readerDisplay.DiffuseColor = [0.0, 0.0, 0.0]
|
| 59 |
+
readerDisplay.AmbientColor = [0.0, 0.0, 0.0]
|
| 60 |
+
readerDisplay.Ambient = 0.0
|
| 61 |
+
readerDisplay.Diffuse = 1.0
|
| 62 |
+
readerDisplay.Specular = 1.0
|
| 63 |
+
readerDisplay.SpecularPower = 100.0
|
| 64 |
+
readerDisplay.SpecularColor = [1.0, 1.0, 1.0]
|
| 65 |
+
|
| 66 |
+
# ============= Display Tubes (Colored by Vorticity) =============
|
| 67 |
+
tubeDisplay = Show(tube, renderView)
|
| 68 |
+
tubeDisplay.Representation = 'Surface'
|
| 69 |
+
|
| 70 |
+
# Color by Vorticity magnitude
|
| 71 |
+
ColorBy(tubeDisplay, ('POINTS', 'Vorticity', 'Magnitude'))
|
| 72 |
+
|
| 73 |
+
# Vorticity color transfer function - Cool to Warm
|
| 74 |
+
vorticityLUT = GetColorTransferFunction('Vorticity')
|
| 75 |
+
vorticityLUT.RGBPoints = [
|
| 76 |
+
0.011427014127020022, 0.231373, 0.298039, 0.752941,
|
| 77 |
+
0.06627861150384136, 0.865003, 0.865003, 0.865003,
|
| 78 |
+
0.12113020888066268, 0.705882, 0.0156863, 0.14902
|
| 79 |
+
]
|
| 80 |
+
vorticityLUT.ColorSpace = 'Diverging'
|
| 81 |
+
vorticityLUT.NumberOfTableValues = 256
|
| 82 |
+
|
| 83 |
+
tubeDisplay.LookupTable = vorticityLUT
|
| 84 |
+
|
| 85 |
+
# Lighting properties
|
| 86 |
+
tubeDisplay.AmbientColor = [0.2, 0.6, 0.9]
|
| 87 |
+
tubeDisplay.DiffuseColor = [0.2, 0.6, 0.9]
|
| 88 |
+
tubeDisplay.Ambient = 0.1
|
| 89 |
+
tubeDisplay.Diffuse = 0.8
|
| 90 |
+
tubeDisplay.Specular = 0.5
|
| 91 |
+
tubeDisplay.SpecularPower = 40.0
|
| 92 |
+
tubeDisplay.SpecularColor = [1.0, 1.0, 1.0]
|
| 93 |
+
|
| 94 |
+
# ============= Lighting Setup =============
|
| 95 |
+
renderView.UseLight = True
|
| 96 |
+
renderView.KeyLightWarmth = 0.6
|
| 97 |
+
renderView.KeyLightIntensity = 0.8
|
| 98 |
+
renderView.FillLightWarmth = 0.4
|
| 99 |
+
|
| 100 |
+
# ============= Camera Setup =============
|
| 101 |
+
renderView.CameraPosition = [-150.9869248398403, 391.7532864870642, 219.6428988217961]
|
| 102 |
+
renderView.CameraFocalPoint = [32.38121308065774, 120.40859825991274, 81.63393818503701]
|
| 103 |
+
renderView.CameraViewUp = [0.23256370029970702, -0.31145477116075004, 0.9213631481799741]
|
| 104 |
+
renderView.CameraViewAngle = 30.0
|
| 105 |
+
renderView.CameraParallelProjection = 0
|
| 106 |
+
|
| 107 |
+
# ============= Color Bar (Legend) =============
|
| 108 |
+
tubeDisplay.SetScalarBarVisibility(renderView, True)
|
| 109 |
+
colorBar = GetScalarBar(vorticityLUT, renderView)
|
| 110 |
+
colorBar.Title = ''
|
| 111 |
+
colorBar.ComponentTitle = ''
|
| 112 |
+
colorBar.LabelColor = [0.0, 0.0, 0.0]
|
| 113 |
+
colorBar.Visibility = 1
|
| 114 |
+
colorBar.ScalarBarLength = 0.3
|
| 115 |
+
|
| 116 |
+
# ============= Save =============
|
| 117 |
+
Render(renderView)
|
| 118 |
+
SaveScreenshot(OUTPUT_IMAGE, renderView, ImageResolution=IMAGE_SIZE)
|
| 119 |
+
print(f"Screenshot saved to: {OUTPUT_IMAGE}")
|
| 120 |
+
|
| 121 |
+
SaveState(OUTPUT_STATE)
|
| 122 |
+
print(f"State saved to: {OUTPUT_STATE}")
|
main/ABC/data/abc.raw
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5d6720499d8b23f53f6f0a4c5e1aaa7b91b083e0d9a0882c85482cfa79cddb32
|
| 3 |
+
size 25165824
|
main/ABC/data/abc.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
128 128 128
|
main/ABC/task_description.txt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Load the ABC (Arnold-Beltrami-Childress) flow vector field from "ABC/data/abc.raw", the information about this dataset:
|
| 2 |
+
ABC Flow (Vector)
|
| 3 |
+
Data Scalar Type: float
|
| 4 |
+
Data Byte Order: Little Endian
|
| 5 |
+
Data Extent: 128x128x128
|
| 6 |
+
Number of Scalar Components: 3
|
| 7 |
+
Data loading is very important, make sure you correctly load the dataset according to their features.
|
| 8 |
+
|
| 9 |
+
Create streamlines using a "Stream Tracer" filter with "Point Cloud" seed type. Set the seed center to [73.77, 63.25, 71.65], with 150 seed points and a radius of 75.0. Set integration direction to "BOTH" and maximum streamline length to 150.0.
|
| 10 |
+
|
| 11 |
+
Add a "Tube" filter on the stream tracer to enhance visualization. Set tube radius to 0.57 with 12 sides.
|
| 12 |
+
|
| 13 |
+
Color the tubes by Vorticity magnitude using the 'Cool to Warm (Diverging)' colormap.
|
| 14 |
+
|
| 15 |
+
Show the dataset bounding box as an outline.
|
| 16 |
+
|
| 17 |
+
Use a dark background (RGB: 0.1, 0.1, 0.15). Render at 1024x1024.
|
| 18 |
+
|
| 19 |
+
Save the paraview state as "ABC/results/{agent_mode}/ABC.pvsm".
|
| 20 |
+
Save the visualization image as "ABC/results/{agent_mode}/ABC.png".
|
| 21 |
+
(Optional, if use python script) Save the python script as "ABC/results/{agent_mode}/ABC.py".
|
| 22 |
+
Do not save any other files, and always save the visualization image.
|
main/ABC/visualization_goals.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
vision:
|
| 2 |
+
1. Streamline Density: Are the streamline tubes densely distributed throughout the volume, similar to the ground truth?
|
| 3 |
+
2. Color Mapping: Are the tubes colored by vorticity magnitude using a blue-white-red diverging colormap, with a similar color distribution as the ground truth?
|
| 4 |
+
3. Tube Appearance: Do the streamline tubes have a similar thickness and smooth appearance as the ground truth?
|
main/Bernard/GS/bernard_streamline.png
ADDED
|
Git LFS Details
|
main/{tornado/GS/gs_diagonal_view.png → Bernard/GS/bernard_streamline.pvsm}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8435f88d5b08483d8322d89950aa548a6abff2be841cbc0e800b5e005c3e3f30
|
| 3 |
+
size 582447
|
main/Bernard/GS/bernard_streamline.py
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from paraview.simple import *
|
| 2 |
+
|
| 3 |
+
# ============= Configuration =============
|
| 4 |
+
INPUT_FILE = '/home/dullpigeon/Desktop/SciVisAgentTask/Bernard/bernard.raw'
|
| 5 |
+
OUTPUT_FILE = '/home/dullpigeon/Desktop/SciVisAgentTask/Bernard/bernard_streamline.png'
|
| 6 |
+
IMAGE_SIZE = [1280, 1280]
|
| 7 |
+
|
| 8 |
+
# ============= Load Data =============
|
| 9 |
+
reader = ImageReader(FileNames=[INPUT_FILE])
|
| 10 |
+
reader.DataScalarType = 'float'
|
| 11 |
+
reader.DataByteOrder = 'LittleEndian'
|
| 12 |
+
reader.DataExtent = [0, 127, 0, 31, 0, 63]
|
| 13 |
+
reader.FileDimensionality = 3
|
| 14 |
+
reader.NumberOfScalarComponents = 3
|
| 15 |
+
reader.DataSpacing = [1.0, 1.0, 1.0]
|
| 16 |
+
reader.DataOrigin = [0.0, 0.0, 0.0]
|
| 17 |
+
reader.UpdatePipeline()
|
| 18 |
+
|
| 19 |
+
# ============= Create View =============
|
| 20 |
+
renderView = CreateView('RenderView')
|
| 21 |
+
renderView.ViewSize = IMAGE_SIZE
|
| 22 |
+
renderView.Background = [0.329, 0.349, 0.427]
|
| 23 |
+
|
| 24 |
+
layout = CreateLayout(name='Layout')
|
| 25 |
+
layout.AssignView(0, renderView)
|
| 26 |
+
|
| 27 |
+
# ============= Common StreamTracer parameters =============
|
| 28 |
+
def create_stream_tracer(seed_center, seed_num_points=100, seed_radius=12.7):
|
| 29 |
+
tracer = StreamTracer(Input=reader, SeedType='Point Cloud')
|
| 30 |
+
tracer.Vectors = ['POINTS', 'ImageFile']
|
| 31 |
+
tracer.IntegrationDirection = 'BOTH'
|
| 32 |
+
tracer.IntegratorType = 'Runge-Kutta 4-5'
|
| 33 |
+
tracer.IntegrationStepUnit = 'Cell Length'
|
| 34 |
+
tracer.InitialStepLength = 0.2
|
| 35 |
+
tracer.MinimumStepLength = 0.01
|
| 36 |
+
tracer.MaximumStepLength = 0.5
|
| 37 |
+
tracer.MaximumSteps = 2000
|
| 38 |
+
tracer.MaximumStreamlineLength = 127.0
|
| 39 |
+
tracer.MaximumError = 1e-06
|
| 40 |
+
tracer.TerminalSpeed = 1e-12
|
| 41 |
+
tracer.ComputeVorticity = 1
|
| 42 |
+
tracer.SeedType.Center = seed_center
|
| 43 |
+
tracer.SeedType.NumberOfPoints = seed_num_points
|
| 44 |
+
tracer.SeedType.Radius = seed_radius
|
| 45 |
+
tracer.UpdatePipeline()
|
| 46 |
+
return tracer
|
| 47 |
+
|
| 48 |
+
TUBE_RADIUS = 0.3
|
| 49 |
+
|
| 50 |
+
# ============= StreamTracer #1 (Blue) - upper Z region, left =============
|
| 51 |
+
streamTracer1 = create_stream_tracer([30.69363105646732, 14.606974171411734, 47.98687368903744])
|
| 52 |
+
Hide(streamTracer1, renderView)
|
| 53 |
+
|
| 54 |
+
tube1 = Tube(Input=streamTracer1)
|
| 55 |
+
tube1.Radius = TUBE_RADIUS
|
| 56 |
+
tube1.NumberofSides = 12
|
| 57 |
+
tube1.UpdatePipeline()
|
| 58 |
+
|
| 59 |
+
display1 = Show(tube1, renderView)
|
| 60 |
+
display1.Representation = 'Surface'
|
| 61 |
+
ColorBy(display1, None)
|
| 62 |
+
display1.AmbientColor = [0.0, 0.6666666666666666, 1.0]
|
| 63 |
+
display1.DiffuseColor = [0.0, 0.6666666666666666, 1.0]
|
| 64 |
+
display1.Ambient = 0.1
|
| 65 |
+
display1.Diffuse = 0.9
|
| 66 |
+
display1.Specular = 1.0
|
| 67 |
+
display1.SpecularPower = 25.0
|
| 68 |
+
|
| 69 |
+
# ============= StreamTracer #2 (Orange) - upper Z region, right =============
|
| 70 |
+
streamTracer2 = create_stream_tracer([91.10220497064907, 14.648011311581818, 45.695641513117174])
|
| 71 |
+
Hide(streamTracer2, renderView)
|
| 72 |
+
|
| 73 |
+
tube2 = Tube(Input=streamTracer2)
|
| 74 |
+
tube2.Radius = TUBE_RADIUS
|
| 75 |
+
tube2.NumberofSides = 12
|
| 76 |
+
tube2.UpdatePipeline()
|
| 77 |
+
|
| 78 |
+
display2 = Show(tube2, renderView)
|
| 79 |
+
display2.Representation = 'Surface'
|
| 80 |
+
ColorBy(display2, None)
|
| 81 |
+
display2.AmbientColor = [1.0, 0.3333333333333333, 0.0]
|
| 82 |
+
display2.DiffuseColor = [1.0, 0.3333333333333333, 0.0]
|
| 83 |
+
display2.Ambient = 0.1
|
| 84 |
+
display2.Diffuse = 0.9
|
| 85 |
+
display2.Specular = 1.0
|
| 86 |
+
display2.SpecularPower = 25.0
|
| 87 |
+
|
| 88 |
+
# ============= StreamTracer #3 (Colored by ImageFile) - lower Z region, left =============
|
| 89 |
+
streamTracer3 = create_stream_tracer([31.87023906731507, 12.756683337497686, 15.894907695885063])
|
| 90 |
+
Hide(streamTracer3, renderView)
|
| 91 |
+
|
| 92 |
+
tube3 = Tube(Input=streamTracer3)
|
| 93 |
+
tube3.Radius = TUBE_RADIUS
|
| 94 |
+
tube3.NumberofSides = 12
|
| 95 |
+
tube3.UpdatePipeline()
|
| 96 |
+
|
| 97 |
+
display3 = Show(tube3, renderView)
|
| 98 |
+
display3.Representation = 'Surface'
|
| 99 |
+
ColorBy(display3, ('POINTS', 'ImageFile', 'Magnitude'))
|
| 100 |
+
|
| 101 |
+
imageFileLUT = GetColorTransferFunction('ImageFile')
|
| 102 |
+
imageFileLUT.RGBPoints = [
|
| 103 |
+
0.0008126780597642342, 0.231373, 0.298039, 0.752941,
|
| 104 |
+
0.25364943975098625, 0.865003, 0.865003, 0.865003,
|
| 105 |
+
0.5064862014422082, 0.705882, 0.0156863, 0.14902
|
| 106 |
+
]
|
| 107 |
+
imageFileLUT.ColorSpace = 'Diverging'
|
| 108 |
+
imageFileLUT.NumberOfTableValues = 256
|
| 109 |
+
display3.LookupTable = imageFileLUT
|
| 110 |
+
display3.Ambient = 0.1
|
| 111 |
+
display3.Diffuse = 0.9
|
| 112 |
+
display3.Specular = 1.0
|
| 113 |
+
display3.SpecularPower = 25.0
|
| 114 |
+
|
| 115 |
+
# ============= StreamTracer #4 (Green) - lower Z region, right =============
|
| 116 |
+
streamTracer4 = create_stream_tracer([92.09277450943044, 10.501538955968837, 15.324680632956035])
|
| 117 |
+
Hide(streamTracer4, renderView)
|
| 118 |
+
|
| 119 |
+
tube4 = Tube(Input=streamTracer4)
|
| 120 |
+
tube4.Radius = TUBE_RADIUS
|
| 121 |
+
tube4.NumberofSides = 12
|
| 122 |
+
tube4.UpdatePipeline()
|
| 123 |
+
|
| 124 |
+
display4 = Show(tube4, renderView)
|
| 125 |
+
display4.Representation = 'Surface'
|
| 126 |
+
ColorBy(display4, None)
|
| 127 |
+
display4.AmbientColor = [0.3333333333333333, 0.6666666666666666, 0.0]
|
| 128 |
+
display4.DiffuseColor = [0.3333333333333333, 0.6666666666666666, 0.0]
|
| 129 |
+
display4.Ambient = 0.1
|
| 130 |
+
display4.Diffuse = 0.9
|
| 131 |
+
display4.Specular = 1.0
|
| 132 |
+
display4.SpecularPower = 25.0
|
| 133 |
+
|
| 134 |
+
# ============= Lighting =============
|
| 135 |
+
renderView.UseLight = True
|
| 136 |
+
renderView.KeyLightWarmth = 0.5
|
| 137 |
+
renderView.KeyLightIntensity = 0.9
|
| 138 |
+
renderView.FillLightWarmth = 0.4
|
| 139 |
+
|
| 140 |
+
light = AddLight(view=renderView)
|
| 141 |
+
light.Coords = 1 # Headlight
|
| 142 |
+
light.Intensity = 0.5
|
| 143 |
+
|
| 144 |
+
# ============= Camera Settings =============
|
| 145 |
+
renderView.CameraPosition = [-81.98633122306042, -141.45193378411128, 89.85554690899205]
|
| 146 |
+
renderView.CameraFocalPoint = [65.58071842141872, 26.289083381147567, 28.47827338802388]
|
| 147 |
+
renderView.CameraViewUp = [0.17857755931542532, 0.19572786724332386, 0.9642617161815177]
|
| 148 |
+
renderView.CameraViewAngle = 30.0
|
| 149 |
+
renderView.CameraParallelScale = 72.55859700958943
|
| 150 |
+
|
| 151 |
+
# ============= No Legend for Bernard =============
|
| 152 |
+
display3.SetScalarBarVisibility(renderView, False)
|
| 153 |
+
|
| 154 |
+
# ============= Save =============
|
| 155 |
+
Render(renderView)
|
| 156 |
+
SaveScreenshot(OUTPUT_FILE, renderView, ImageResolution=IMAGE_SIZE)
|
| 157 |
+
print(f'Screenshot saved to {OUTPUT_FILE}')
|
| 158 |
+
|
| 159 |
+
OUTPUT_STATE = '/home/dullpigeon/Desktop/SciVisAgentTask/Bernard/bernard_streamline.pvsm'
|
| 160 |
+
SaveState(OUTPUT_STATE)
|
| 161 |
+
print(f'State saved to {OUTPUT_STATE}')
|
main/Bernard/data/bernard.raw
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6581ae4f4d0cc7e67f95113bfc7c6af044e361824a05a08555e9a2f83b1f55aa
|
| 3 |
+
size 3145728
|
main/Bernard/data/bernard.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
128 32 64
|
main/Bernard/task_description.txt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Load the Rayleigh-Benard convection vector field from "Bernard/data/bernard.raw", the information about this dataset:
|
| 2 |
+
Rayleigh-Benard Convection (Vector)
|
| 3 |
+
Data Scalar Type: float
|
| 4 |
+
Data Byte Order: Little Endian
|
| 5 |
+
Data Extent: 128x32x64
|
| 6 |
+
Number of Scalar Components: 3
|
| 7 |
+
Data loading is very important, make sure you correctly load the dataset according to their features.
|
| 8 |
+
|
| 9 |
+
Create four streamline sets using "Stream Tracer" filters with "Point Cloud" seed type, each with 100 seed points and radius 12.7:
|
| 10 |
+
- Streamline 1: Seed center at [30.69, 14.61, 47.99]. Apply a "Tube" filter (radius 0.3, 12 sides). Color with solid blue (RGB: 0.0, 0.67, 1.0).
|
| 11 |
+
- Streamline 2: Seed center at [91.10, 14.65, 45.70]. Apply a "Tube" filter (radius 0.3, 12 sides). Color with solid orange (RGB: 1.0, 0.33, 0.0).
|
| 12 |
+
- Streamline 3: Seed center at [31.87, 12.76, 15.89]. Apply a "Tube" filter (radius 0.3, 12 sides). Color by velocity magnitude using the 'Cool to Warm (Diverging)' colormap.
|
| 13 |
+
- Streamline 4: Seed center at [92.09, 10.50, 15.32]. Apply a "Tube" filter (radius 0.3, 12 sides). Color with solid green (RGB: 0.33, 0.67, 0.0).
|
| 14 |
+
|
| 15 |
+
In the pipeline browser panel, hide all stream tracers and only show the tube filters.
|
| 16 |
+
|
| 17 |
+
Use a gray-blue background (RGB: 0.329, 0.349, 0.427). Render at 1280x1280. Do not show a color bar.
|
| 18 |
+
|
| 19 |
+
Save the paraview state as "Bernard/results/{agent_mode}/Bernard.pvsm".
|
| 20 |
+
Save the visualization image as "Bernard/results/{agent_mode}/Bernard.png".
|
| 21 |
+
(Optional, if use python script) Save the python script as "Bernard/results/{agent_mode}/Bernard.py".
|
| 22 |
+
Do not save any other files, and always save the visualization image.
|
main/Bernard/visualization_goals.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
vision:
|
| 2 |
+
1. Streamline Grouping: Are there four visually separate streamline clusters arranged in a 2x2 grid pattern, similar to the ground truth?
|
| 3 |
+
2. Color Assignment: Are the four streamline groups colored in distinct colors (blue, orange, magnitude-mapped, and green), matching the ground truth color scheme?
|
| 4 |
+
3. Convection Cell Structure: Do the streamlines within each group show circular or helical looping patterns characteristic of convection cells?
|
main/{tornado/GS/gs_front_view.png → crayfish/GS/crayfish_streamline.png}
RENAMED
|
File without changes
|
main/crayfish/GS/crayfish_streamline.pvsm
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6bb462c5dac0033ce7533c7c2fd98f1b36bfa2da305136c6a5cdfe9aac7f3efb
|
| 3 |
+
size 474241
|
main/crayfish/GS/crayfish_streamline.py
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from paraview.simple import *
|
| 2 |
+
|
| 3 |
+
# ============= Configuration =============
|
| 4 |
+
INPUT_FILE = '/home/dullpigeon/Desktop/SciVisAgentTask/crayfish/crayfish.raw'
|
| 5 |
+
OUTPUT_FILE = '/home/dullpigeon/Desktop/SciVisAgentTask/crayfish/crayfish_streamline.png'
|
| 6 |
+
IMAGE_SIZE = [1280, 1280]
|
| 7 |
+
|
| 8 |
+
# Data dimensions: 322 x 162 x 119
|
| 9 |
+
DIM_X, DIM_Y, DIM_Z = 322, 162, 119
|
| 10 |
+
MAX_DIM = max(DIM_X, DIM_Y, DIM_Z)
|
| 11 |
+
CENTER = [DIM_X / 2.0, DIM_Y / 2.0, DIM_Z / 2.0]
|
| 12 |
+
|
| 13 |
+
# ============= Load Data =============
|
| 14 |
+
reader = ImageReader(FileNames=[INPUT_FILE])
|
| 15 |
+
reader.DataScalarType = 'float'
|
| 16 |
+
reader.DataByteOrder = 'LittleEndian'
|
| 17 |
+
reader.DataExtent = [0, DIM_X - 1, 0, DIM_Y - 1, 0, DIM_Z - 1]
|
| 18 |
+
reader.FileDimensionality = 3
|
| 19 |
+
reader.NumberOfScalarComponents = 3
|
| 20 |
+
reader.DataSpacing = [1.0, 1.0, 1.0]
|
| 21 |
+
reader.DataOrigin = [0.0, 0.0, 0.0]
|
| 22 |
+
reader.UpdatePipeline()
|
| 23 |
+
|
| 24 |
+
# ============= Create View =============
|
| 25 |
+
renderView = CreateView('RenderView')
|
| 26 |
+
renderView.ViewSize = IMAGE_SIZE
|
| 27 |
+
renderView.Background = [0.329, 0.349, 0.427]
|
| 28 |
+
|
| 29 |
+
layout = CreateLayout(name='Layout')
|
| 30 |
+
layout.AssignView(0, renderView)
|
| 31 |
+
|
| 32 |
+
# ============= Vorticity Color Map (Cool to Warm) =============
|
| 33 |
+
vorticityLUT = GetColorTransferFunction('Vorticity')
|
| 34 |
+
vorticityLUT.RGBPoints = [
|
| 35 |
+
0.0, 0.231373, 0.298039, 0.752941,
|
| 36 |
+
0.02, 0.865003, 0.865003, 0.865003,
|
| 37 |
+
0.15, 0.705882, 0.0156863, 0.14902
|
| 38 |
+
]
|
| 39 |
+
vorticityLUT.ColorSpace = 'Diverging'
|
| 40 |
+
vorticityLUT.NumberOfTableValues = 256
|
| 41 |
+
|
| 42 |
+
# ============= StreamTracer #1 (Blue seed region) =============
|
| 43 |
+
streamTracer1 = StreamTracer(Input=reader, SeedType='Point Cloud')
|
| 44 |
+
streamTracer1.Vectors = ['POINTS', 'ImageFile']
|
| 45 |
+
streamTracer1.IntegrationDirection = 'BOTH'
|
| 46 |
+
streamTracer1.IntegratorType = 'Runge-Kutta 4-5'
|
| 47 |
+
streamTracer1.IntegrationStepUnit = 'Cell Length'
|
| 48 |
+
streamTracer1.InitialStepLength = 0.2
|
| 49 |
+
streamTracer1.MinimumStepLength = 0.01
|
| 50 |
+
streamTracer1.MaximumStepLength = 0.5
|
| 51 |
+
streamTracer1.MaximumSteps = 2000
|
| 52 |
+
streamTracer1.MaximumStreamlineLength = float(MAX_DIM)
|
| 53 |
+
streamTracer1.MaximumError = 1e-06
|
| 54 |
+
streamTracer1.TerminalSpeed = 1e-12
|
| 55 |
+
streamTracer1.ComputeVorticity = 1
|
| 56 |
+
streamTracer1.SeedType.Center = [DIM_X / 3.0, 81.0, 59.5]
|
| 57 |
+
streamTracer1.SeedType.NumberOfPoints = 100
|
| 58 |
+
streamTracer1.SeedType.Radius = MAX_DIM * 0.1
|
| 59 |
+
streamTracer1.UpdatePipeline()
|
| 60 |
+
|
| 61 |
+
Hide(streamTracer1, renderView)
|
| 62 |
+
|
| 63 |
+
tube1 = Tube(Input=streamTracer1)
|
| 64 |
+
tube1.Radius = 0.5
|
| 65 |
+
tube1.NumberofSides = 12
|
| 66 |
+
tube1.UpdatePipeline()
|
| 67 |
+
|
| 68 |
+
display1 = Show(tube1, renderView)
|
| 69 |
+
display1.Representation = 'Surface'
|
| 70 |
+
ColorBy(display1, ('POINTS', 'Vorticity', 'Magnitude'))
|
| 71 |
+
display1.LookupTable = vorticityLUT
|
| 72 |
+
display1.RescaleTransferFunctionToDataRange(True)
|
| 73 |
+
display1.Ambient = 0.05
|
| 74 |
+
display1.Diffuse = 1.0
|
| 75 |
+
display1.Specular = 1.0
|
| 76 |
+
display1.SpecularPower = 25.0
|
| 77 |
+
|
| 78 |
+
# ============= StreamTracer #2 (Orange seed region) =============
|
| 79 |
+
streamTracer2 = StreamTracer(Input=reader, SeedType='Point Cloud')
|
| 80 |
+
streamTracer2.Vectors = ['POINTS', 'ImageFile']
|
| 81 |
+
streamTracer2.IntegrationDirection = 'BOTH'
|
| 82 |
+
streamTracer2.IntegratorType = 'Runge-Kutta 4-5'
|
| 83 |
+
streamTracer2.IntegrationStepUnit = 'Cell Length'
|
| 84 |
+
streamTracer2.InitialStepLength = 0.2
|
| 85 |
+
streamTracer2.MinimumStepLength = 0.01
|
| 86 |
+
streamTracer2.MaximumStepLength = 0.5
|
| 87 |
+
streamTracer2.MaximumSteps = 2000
|
| 88 |
+
streamTracer2.MaximumStreamlineLength = float(MAX_DIM)
|
| 89 |
+
streamTracer2.MaximumError = 1e-06
|
| 90 |
+
streamTracer2.TerminalSpeed = 1e-12
|
| 91 |
+
streamTracer2.ComputeVorticity = 1
|
| 92 |
+
streamTracer2.SeedType.Center = [DIM_X * 2.0 / 3.0, 81.0, 59.5]
|
| 93 |
+
streamTracer2.SeedType.NumberOfPoints = 100
|
| 94 |
+
streamTracer2.SeedType.Radius = MAX_DIM * 0.1
|
| 95 |
+
streamTracer2.UpdatePipeline()
|
| 96 |
+
|
| 97 |
+
Hide(streamTracer2, renderView)
|
| 98 |
+
|
| 99 |
+
tube2 = Tube(Input=streamTracer2)
|
| 100 |
+
tube2.Radius = 0.5
|
| 101 |
+
tube2.NumberofSides = 12
|
| 102 |
+
tube2.UpdatePipeline()
|
| 103 |
+
|
| 104 |
+
display2 = Show(tube2, renderView)
|
| 105 |
+
display2.Representation = 'Surface'
|
| 106 |
+
ColorBy(display2, ('POINTS', 'Vorticity', 'Magnitude'))
|
| 107 |
+
display2.LookupTable = vorticityLUT
|
| 108 |
+
display2.RescaleTransferFunctionToDataRange(True)
|
| 109 |
+
display2.Ambient = 0.05
|
| 110 |
+
display2.Diffuse = 1.0
|
| 111 |
+
display2.Specular = 1.0
|
| 112 |
+
display2.SpecularPower = 25.0
|
| 113 |
+
|
| 114 |
+
# ============= Re-apply custom colormap after rescale =============
|
| 115 |
+
vorticityLUT.RGBPoints = [
|
| 116 |
+
0.0, 0.231373, 0.298039, 0.752941,
|
| 117 |
+
0.02, 0.865003, 0.865003, 0.865003,
|
| 118 |
+
0.15, 0.705882, 0.0156863, 0.14902
|
| 119 |
+
]
|
| 120 |
+
|
| 121 |
+
# ============= Outline (black border) =============
|
| 122 |
+
readerDisplay = Show(reader, renderView)
|
| 123 |
+
readerDisplay.Representation = 'Outline'
|
| 124 |
+
ColorBy(readerDisplay, None)
|
| 125 |
+
readerDisplay.DiffuseColor = [0.0, 0.0, 0.0]
|
| 126 |
+
readerDisplay.AmbientColor = [0.0, 0.0, 0.0]
|
| 127 |
+
|
| 128 |
+
# ============= Camera Settings =============
|
| 129 |
+
renderView.CameraPosition = [435.04, -325.38, 567.82]
|
| 130 |
+
renderView.CameraFocalPoint = [111.64, 202.81, -21.96]
|
| 131 |
+
renderView.CameraViewUp = [-0.099, 0.714, 0.693]
|
| 132 |
+
renderView.CameraViewAngle = 30.0
|
| 133 |
+
|
| 134 |
+
# ============= Color Bar (Legend) =============
|
| 135 |
+
display1.SetScalarBarVisibility(renderView, True)
|
| 136 |
+
colorBar = GetScalarBar(vorticityLUT, renderView)
|
| 137 |
+
colorBar.Title = ''
|
| 138 |
+
colorBar.ComponentTitle = ''
|
| 139 |
+
colorBar.LabelColor = [0.0, 0.0, 0.0]
|
| 140 |
+
colorBar.Visibility = 1
|
| 141 |
+
colorBar.ScalarBarLength = 0.3
|
| 142 |
+
|
| 143 |
+
# ============= Save =============
|
| 144 |
+
Render(renderView)
|
| 145 |
+
SaveScreenshot(OUTPUT_FILE, renderView, ImageResolution=IMAGE_SIZE)
|
| 146 |
+
print(f'Screenshot saved to {OUTPUT_FILE}')
|
| 147 |
+
|
| 148 |
+
OUTPUT_STATE = '/home/dullpigeon/Desktop/SciVisAgentTask/crayfish/crayfish_streamline.pvsm'
|
| 149 |
+
SaveState(OUTPUT_STATE)
|
| 150 |
+
print(f'State saved to {OUTPUT_STATE}')
|
main/crayfish/data/crayfish.raw
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d5a3e2e2a07fb55c06f0f4db42b6666a4d5d90c0d7bf23541b0aa0f936194dca
|
| 3 |
+
size 74490192
|
main/crayfish/data/crayfish.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
322 162 119
|
main/crayfish/task_description.txt
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Load the Crayfish flow vector field from "crayfish/data/crayfish.raw", the information about this dataset:
|
| 2 |
+
Crayfish Flow (Vector)
|
| 3 |
+
Data Scalar Type: float
|
| 4 |
+
Data Byte Order: Little Endian
|
| 5 |
+
Data Extent: 322x162x119
|
| 6 |
+
Number of Scalar Components: 3
|
| 7 |
+
Data loading is very important, make sure you correctly load the dataset according to their features.
|
| 8 |
+
|
| 9 |
+
Create two streamline sets using "Stream Tracer" filters with "Point Cloud" seed type, each with 100 seed points and radius 32.2:
|
| 10 |
+
- Streamline 1: Seed center at [107.33, 81.0, 59.5]. Apply a "Tube" filter (radius 0.5, 12 sides). Color by Vorticity magnitude using a diverging colormap with the following RGB control points:
|
| 11 |
+
- Value 0.0 -> RGB(0.231, 0.298, 0.753) (blue)
|
| 12 |
+
- Value 0.02 -> RGB(0.865, 0.865, 0.865) (white)
|
| 13 |
+
- Value 0.15 -> RGB(0.706, 0.016, 0.149) (red)
|
| 14 |
+
- Streamline 2: Seed center at [214.67, 81.0, 59.5]. Apply a "Tube" filter (radius 0.5, 12 sides). Color by Vorticity magnitude using the same colormap.
|
| 15 |
+
|
| 16 |
+
Show the dataset bounding box as an outline (black).
|
| 17 |
+
|
| 18 |
+
In the pipeline browser panel, hide all stream tracers and only show the tube filters and the outline.
|
| 19 |
+
|
| 20 |
+
Use a gray-blue background (RGB: 0.329, 0.349, 0.427). Render at 1280x1280.
|
| 21 |
+
|
| 22 |
+
Save the paraview state as "crayfish/results/{agent_mode}/crayfish.pvsm".
|
| 23 |
+
Save the visualization image as "crayfish/results/{agent_mode}/crayfish.png".
|
| 24 |
+
(Optional, if use python script) Save the python script as "crayfish/results/{agent_mode}/crayfish.py".
|
| 25 |
+
Do not save any other files, and always save the visualization image.
|
main/crayfish/visualization_goals.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
vision:
|
| 2 |
+
1. Overall Visualization Goal: Does the result show streamline tubes colored by vorticity magnitude within a rectangular bounding box, similar to the ground truth?
|
| 3 |
+
2. Streamline Clusters: Are there two distinct clusters matches the ground truth layout?
|
| 4 |
+
3. Color Mapping: Are the tubes colored by vorticity magnitude using a blue-white-red diverging colormap, with a similar distribution as the ground truth?
|
| 5 |
+
|
main/rti-velocity_slices/GS/rti-velocity_slices_gs.png
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
main/rti-velocity_slices/GS/rti-velocity_slices_gs.pvsm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0258bfad7702e78d7a86ef9dbe27e2928f06f437c3eea190aed7f9e20d7e816e
|
| 3 |
+
size 511803
|
main/rti-velocity_slices/GS/rti-velocity_slices_gs.py
CHANGED
|
@@ -2,9 +2,9 @@ import os
|
|
| 2 |
from paraview.simple import *
|
| 3 |
|
| 4 |
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
| 5 |
-
VTI_PATH = os.path.join(SCRIPT_DIR, '..', '
|
| 6 |
-
OUTPUT_IMG = os.path.join(SCRIPT_DIR, '
|
| 7 |
-
OUTPUT_STATE = os.path.join(SCRIPT_DIR, '
|
| 8 |
|
| 9 |
reader = XMLImageDataReader(FileName=[VTI_PATH])
|
| 10 |
reader.UpdatePipeline()
|
|
@@ -42,11 +42,14 @@ for s in [sliceX, sliceY, sliceZ]:
|
|
| 42 |
magLUT = GetColorTransferFunction('magnitude')
|
| 43 |
magLUT.ApplyPreset('Turbo', True)
|
| 44 |
|
| 45 |
-
#
|
| 46 |
d.SetScalarBarVisibility(renderView, True)
|
| 47 |
colorBar = GetScalarBar(magLUT, renderView)
|
| 48 |
-
colorBar.Title = '
|
| 49 |
colorBar.ComponentTitle = ''
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
renderView.CameraPosition = [200.0, 200.0, 200.0]
|
| 52 |
renderView.CameraFocalPoint = [63.5, 63.5, 63.5]
|
|
|
|
| 2 |
from paraview.simple import *
|
| 3 |
|
| 4 |
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
| 5 |
+
VTI_PATH = os.path.join(SCRIPT_DIR, '..', 'data', 'rti-velocity_slices.vti')
|
| 6 |
+
OUTPUT_IMG = os.path.join(SCRIPT_DIR, 'rti-velocity_slices_gs.png')
|
| 7 |
+
OUTPUT_STATE = os.path.join(SCRIPT_DIR, 'rti-velocity_slices_gs.pvsm')
|
| 8 |
|
| 9 |
reader = XMLImageDataReader(FileName=[VTI_PATH])
|
| 10 |
reader.UpdatePipeline()
|
|
|
|
| 42 |
magLUT = GetColorTransferFunction('magnitude')
|
| 43 |
magLUT.ApplyPreset('Turbo', True)
|
| 44 |
|
| 45 |
+
# ============= Color Bar (Legend) =============
|
| 46 |
d.SetScalarBarVisibility(renderView, True)
|
| 47 |
colorBar = GetScalarBar(magLUT, renderView)
|
| 48 |
+
colorBar.Title = ''
|
| 49 |
colorBar.ComponentTitle = ''
|
| 50 |
+
colorBar.LabelColor = [0.0, 0.0, 0.0]
|
| 51 |
+
colorBar.Visibility = 1
|
| 52 |
+
colorBar.ScalarBarLength = 0.3
|
| 53 |
|
| 54 |
renderView.CameraPosition = [200.0, 200.0, 200.0]
|
| 55 |
renderView.CameraFocalPoint = [63.5, 63.5, 63.5]
|
main/rti-velocity_slices/visualization_goals.txt
CHANGED
|
@@ -1,7 +1,4 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
2.
|
| 4 |
-
|
| 5 |
-
3. Slice Positioning: Are the three orthogonal slices positioned and oriented similarly to the ground truth?
|
| 6 |
-
|
| 7 |
-
4. Color Mapping: Is the color distribution across all slices visually similar to the ground truth?
|
|
|
|
| 1 |
+
vision:
|
| 2 |
+
1. Slice Count and Orientation: Are there exactly three perpendicular slices (one horizontal XY-plane and two vertical XZ and YZ planes), matching the ground truth arrangement?
|
| 3 |
+
2. Color Mapping: Are the slices colored using a Turbo-like colormap (blue to green to yellow to red) mapped to velocity magnitude, with a similar color distribution as the ground truth?
|
| 4 |
+
3. Mixing Zone Pattern: Does the horizontal (XY) slice show a chaotic, high-velocity-magnitude mixing pattern in its center region, similar to the ground truth?
|
|
|
|
|
|
|
|
|
main/supernova100/GS/supernova100_streamline.png
ADDED
|
Git LFS Details
|
main/supernova100/GS/supernova100_streamline.pvsm
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:51fe12a1dba96d5d5bbb1c188fee1a73372972a2dbcdbed2333ab28dd4aa76fa
|
| 3 |
+
size 351344
|
main/supernova100/GS/supernova100_streamline.py
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# state file generated using paraview version 5.12.1
|
| 2 |
+
import paraview
|
| 3 |
+
paraview.compatibility.major = 5
|
| 4 |
+
paraview.compatibility.minor = 12
|
| 5 |
+
|
| 6 |
+
#### import the simple module from the paraview
|
| 7 |
+
from paraview.simple import *
|
| 8 |
+
#### disable automatic camera reset on 'Show'
|
| 9 |
+
paraview.simple._DisableFirstRenderCameraReset()
|
| 10 |
+
|
| 11 |
+
# ----------------------------------------------------------------
|
| 12 |
+
# setup views used in the visualization
|
| 13 |
+
# ----------------------------------------------------------------
|
| 14 |
+
|
| 15 |
+
# get the material library
|
| 16 |
+
materialLibrary1 = GetMaterialLibrary()
|
| 17 |
+
|
| 18 |
+
# Create a new 'Render View'
|
| 19 |
+
renderView1 = CreateView('RenderView')
|
| 20 |
+
renderView1.ViewSize = [1280, 1280]
|
| 21 |
+
renderView1.AxesGrid = 'Grid Axes 3D Actor'
|
| 22 |
+
renderView1.CenterOfRotation = [49.448320619761944, 49.504851795732975, 49.49083889275789]
|
| 23 |
+
renderView1.StereoType = 'Crystal Eyes'
|
| 24 |
+
renderView1.CameraPosition = [41.375600380195785, 73.91451257516562, -281.99012820613103]
|
| 25 |
+
renderView1.CameraFocalPoint = [49.448320619761944, 49.504851795732975, 49.49083889275789]
|
| 26 |
+
renderView1.CameraViewUp = [0.013861114479786198, 0.9972285417954958, 0.07309654529324446]
|
| 27 |
+
renderView1.CameraFocalDisk = 1.0
|
| 28 |
+
renderView1.CameraParallelScale = 86.05125369292628
|
| 29 |
+
renderView1.LegendGrid = 'Legend Grid Actor'
|
| 30 |
+
renderView1.BackEnd = 'OSPRay raycaster'
|
| 31 |
+
renderView1.OSPRayMaterialLibrary = materialLibrary1
|
| 32 |
+
|
| 33 |
+
SetActiveView(None)
|
| 34 |
+
|
| 35 |
+
# ----------------------------------------------------------------
|
| 36 |
+
# setup view layouts
|
| 37 |
+
# ----------------------------------------------------------------
|
| 38 |
+
|
| 39 |
+
# create new layout object 'Layout'
|
| 40 |
+
layout = CreateLayout(name='Layout')
|
| 41 |
+
layout.AssignView(0, renderView1)
|
| 42 |
+
layout.SetSize(1280, 1280)
|
| 43 |
+
|
| 44 |
+
# ----------------------------------------------------------------
|
| 45 |
+
# restore active view
|
| 46 |
+
SetActiveView(renderView1)
|
| 47 |
+
# ----------------------------------------------------------------
|
| 48 |
+
|
| 49 |
+
# ----------------------------------------------------------------
|
| 50 |
+
# setup the data processing pipelines
|
| 51 |
+
# ----------------------------------------------------------------
|
| 52 |
+
|
| 53 |
+
# create a new 'Image Reader'
|
| 54 |
+
imageReader1 = ImageReader(registrationName='ImageReader1', FileNames=['/home/dullpigeon/Desktop/SciVisAgentTask/supernova100/supernova100.raw'])
|
| 55 |
+
imageReader1.DataScalarType = 'float'
|
| 56 |
+
imageReader1.DataByteOrder = 'LittleEndian'
|
| 57 |
+
imageReader1.NumberOfScalarComponents = 3
|
| 58 |
+
imageReader1.DataExtent = [0, 99, 0, 99, 0, 99]
|
| 59 |
+
|
| 60 |
+
# create a new 'Stream Tracer'
|
| 61 |
+
streamTracer1 = StreamTracer(registrationName='StreamTracer1', Input=imageReader1,
|
| 62 |
+
SeedType='Point Cloud')
|
| 63 |
+
streamTracer1.Vectors = ['POINTS', 'ImageFile']
|
| 64 |
+
streamTracer1.MaximumStreamlineLength = 100.0
|
| 65 |
+
|
| 66 |
+
# init the 'Point Cloud' selected for 'SeedType'
|
| 67 |
+
streamTracer1.SeedType.Center = [50.0, 50.0, 50.0]
|
| 68 |
+
streamTracer1.SeedType.NumberOfPoints = 200
|
| 69 |
+
streamTracer1.SeedType.Radius = 45.0
|
| 70 |
+
|
| 71 |
+
# create a new 'Tube'
|
| 72 |
+
tube1 = Tube(registrationName='Tube1', Input=streamTracer1)
|
| 73 |
+
tube1.Scalars = ['POINTS', 'AngularVelocity']
|
| 74 |
+
tube1.Vectors = ['POINTS', 'Normals']
|
| 75 |
+
tube1.NumberofSides = 12
|
| 76 |
+
tube1.Radius = 0.3
|
| 77 |
+
|
| 78 |
+
# ----------------------------------------------------------------
|
| 79 |
+
# setup the visualization in view 'renderView1'
|
| 80 |
+
# ----------------------------------------------------------------
|
| 81 |
+
|
| 82 |
+
# show data from tube1
|
| 83 |
+
tube1Display = Show(tube1, renderView1, 'GeometryRepresentation')
|
| 84 |
+
|
| 85 |
+
# get 2D transfer function for 'Vorticity'
|
| 86 |
+
vorticityTF2D = GetTransferFunction2D('Vorticity')
|
| 87 |
+
|
| 88 |
+
# get color transfer function/color map for 'Vorticity'
|
| 89 |
+
vorticityLUT = GetColorTransferFunction('Vorticity')
|
| 90 |
+
vorticityLUT.TransferFunction2D = vorticityTF2D
|
| 91 |
+
vorticityLUT.RGBPoints = [0.0, 0.231373, 0.298039, 0.752941, 0.05, 0.865003, 0.865003, 0.865003, 0.5, 0.705882, 0.0156863, 0.14902]
|
| 92 |
+
vorticityLUT.ScalarRangeInitialized = 1.0
|
| 93 |
+
|
| 94 |
+
# trace defaults for the display properties.
|
| 95 |
+
tube1Display.Representation = 'Surface'
|
| 96 |
+
tube1Display.AmbientColor = [0.996078431372549, 1.0, 0.8431372549019608]
|
| 97 |
+
tube1Display.ColorArrayName = ['POINTS', 'Vorticity']
|
| 98 |
+
tube1Display.DiffuseColor = [0.996078431372549, 1.0, 0.8431372549019608]
|
| 99 |
+
tube1Display.LookupTable = vorticityLUT
|
| 100 |
+
tube1Display.Specular = 1.0
|
| 101 |
+
tube1Display.SpecularPower = 25.0
|
| 102 |
+
tube1Display.Ambient = 0.05
|
| 103 |
+
tube1Display.SelectTCoordArray = 'None'
|
| 104 |
+
tube1Display.SelectNormalArray = 'TubeNormals'
|
| 105 |
+
tube1Display.SelectTangentArray = 'None'
|
| 106 |
+
tube1Display.OSPRayScaleArray = 'ImageFile'
|
| 107 |
+
tube1Display.OSPRayScaleFunction = 'Piecewise Function'
|
| 108 |
+
tube1Display.Assembly = ''
|
| 109 |
+
tube1Display.SelectOrientationVectors = 'Normals'
|
| 110 |
+
tube1Display.ScaleFactor = 9.941288857162
|
| 111 |
+
tube1Display.SelectScaleArray = 'ImageFile'
|
| 112 |
+
tube1Display.GlyphType = 'Arrow'
|
| 113 |
+
tube1Display.GlyphTableIndexArray = 'ImageFile'
|
| 114 |
+
tube1Display.GaussianRadius = 0.4970644428581
|
| 115 |
+
tube1Display.SetScaleArray = ['POINTS', 'ImageFile']
|
| 116 |
+
tube1Display.ScaleTransferFunction = 'Piecewise Function'
|
| 117 |
+
tube1Display.OpacityArray = ['POINTS', 'ImageFile']
|
| 118 |
+
tube1Display.OpacityTransferFunction = 'Piecewise Function'
|
| 119 |
+
tube1Display.DataAxesGrid = 'Grid Axes Representation'
|
| 120 |
+
tube1Display.PolarAxes = 'Polar Axes Representation'
|
| 121 |
+
tube1Display.SelectInputVectors = ['POINTS', 'Normals']
|
| 122 |
+
tube1Display.WriteLog = ''
|
| 123 |
+
|
| 124 |
+
# init the 'Piecewise Function' selected for 'ScaleTransferFunction'
|
| 125 |
+
tube1Display.ScaleTransferFunction.Points = [-0.9286808371543884, 0.0, 0.5, 0.0, 0.93073570728302, 1.0, 0.5, 0.0]
|
| 126 |
+
|
| 127 |
+
# init the 'Piecewise Function' selected for 'OpacityTransferFunction'
|
| 128 |
+
tube1Display.OpacityTransferFunction.Points = [-0.9286808371543884, 0.0, 0.5, 0.0, 0.93073570728302, 1.0, 0.5, 0.0]
|
| 129 |
+
|
| 130 |
+
# show data from imageReader1
|
| 131 |
+
imageReader1Display = Show(imageReader1, renderView1, 'UniformGridRepresentation')
|
| 132 |
+
|
| 133 |
+
# trace defaults for the display properties.
|
| 134 |
+
imageReader1Display.Representation = 'Outline'
|
| 135 |
+
imageReader1Display.AmbientColor = [0.0, 0.0, 0.0]
|
| 136 |
+
imageReader1Display.ColorArrayName = ['POINTS', '']
|
| 137 |
+
imageReader1Display.DiffuseColor = [0.0, 0.0, 0.0]
|
| 138 |
+
imageReader1Display.SelectTCoordArray = 'None'
|
| 139 |
+
imageReader1Display.SelectNormalArray = 'None'
|
| 140 |
+
imageReader1Display.SelectTangentArray = 'None'
|
| 141 |
+
imageReader1Display.OSPRayScaleArray = 'ImageFile'
|
| 142 |
+
imageReader1Display.OSPRayScaleFunction = 'Piecewise Function'
|
| 143 |
+
imageReader1Display.Assembly = ''
|
| 144 |
+
imageReader1Display.SelectOrientationVectors = 'ImageFile'
|
| 145 |
+
imageReader1Display.ScaleFactor = 9.9
|
| 146 |
+
imageReader1Display.SelectScaleArray = 'ImageFile'
|
| 147 |
+
imageReader1Display.GlyphType = 'Arrow'
|
| 148 |
+
imageReader1Display.GlyphTableIndexArray = 'ImageFile'
|
| 149 |
+
imageReader1Display.GaussianRadius = 0.495
|
| 150 |
+
imageReader1Display.SetScaleArray = ['POINTS', 'ImageFile']
|
| 151 |
+
imageReader1Display.ScaleTransferFunction = 'Piecewise Function'
|
| 152 |
+
imageReader1Display.OpacityArray = ['POINTS', 'ImageFile']
|
| 153 |
+
imageReader1Display.OpacityTransferFunction = 'Piecewise Function'
|
| 154 |
+
imageReader1Display.DataAxesGrid = 'Grid Axes Representation'
|
| 155 |
+
imageReader1Display.PolarAxes = 'Polar Axes Representation'
|
| 156 |
+
imageReader1Display.ScalarOpacityUnitDistance = 1.7320508075688772
|
| 157 |
+
imageReader1Display.OpacityArrayName = ['POINTS', 'ImageFile']
|
| 158 |
+
imageReader1Display.ColorArray2Name = ['POINTS', 'ImageFile']
|
| 159 |
+
imageReader1Display.IsosurfaceValues = [-0.0013266801834106445]
|
| 160 |
+
imageReader1Display.SliceFunction = 'Plane'
|
| 161 |
+
imageReader1Display.Slice = 49
|
| 162 |
+
imageReader1Display.SelectInputVectors = ['POINTS', 'ImageFile']
|
| 163 |
+
imageReader1Display.WriteLog = ''
|
| 164 |
+
|
| 165 |
+
# init the 'Piecewise Function' selected for 'ScaleTransferFunction'
|
| 166 |
+
imageReader1Display.ScaleTransferFunction.Points = [-1.05519700050354, 0.0, 0.5, 0.0, 1.0525436401367188, 1.0, 0.5, 0.0]
|
| 167 |
+
|
| 168 |
+
# init the 'Piecewise Function' selected for 'OpacityTransferFunction'
|
| 169 |
+
imageReader1Display.OpacityTransferFunction.Points = [-1.05519700050354, 0.0, 0.5, 0.0, 1.0525436401367188, 1.0, 0.5, 0.0]
|
| 170 |
+
|
| 171 |
+
# init the 'Plane' selected for 'SliceFunction'
|
| 172 |
+
imageReader1Display.SliceFunction.Origin = [49.5, 49.5, 49.5]
|
| 173 |
+
|
| 174 |
+
# setup the color legend parameters for each legend in this view
|
| 175 |
+
|
| 176 |
+
# get color legend/bar for vorticityLUT in view renderView1
|
| 177 |
+
vorticityLUTColorBar = GetScalarBar(vorticityLUT, renderView1)
|
| 178 |
+
vorticityLUTColorBar.Title = ''
|
| 179 |
+
vorticityLUTColorBar.ComponentTitle = ''
|
| 180 |
+
vorticityLUTColorBar.LabelColor = [0.0, 0.0, 0.0]
|
| 181 |
+
vorticityLUTColorBar.ScalarBarLength = 0.3
|
| 182 |
+
|
| 183 |
+
# set color bar visibility
|
| 184 |
+
vorticityLUTColorBar.Visibility = 1
|
| 185 |
+
|
| 186 |
+
# show color legend
|
| 187 |
+
tube1Display.SetScalarBarVisibility(renderView1, True)
|
| 188 |
+
|
| 189 |
+
# ----------------------------------------------------------------
|
| 190 |
+
# setup color maps and opacity maps used in the visualization
|
| 191 |
+
# note: the Get..() functions create a new object, if needed
|
| 192 |
+
# ----------------------------------------------------------------
|
| 193 |
+
|
| 194 |
+
# get opacity transfer function/opacity map for 'Vorticity'
|
| 195 |
+
vorticityPWF = GetOpacityTransferFunction('Vorticity')
|
| 196 |
+
vorticityPWF.Points = [0.0, 0.0, 0.5, 0.0, 2.1077474082537866, 1.0, 0.5, 0.0]
|
| 197 |
+
vorticityPWF.ScalarRangeInitialized = 1
|
| 198 |
+
|
| 199 |
+
# ----------------------------------------------------------------
|
| 200 |
+
# setup animation scene, tracks and keyframes
|
| 201 |
+
# note: the Get..() functions create a new object, if needed
|
| 202 |
+
# ----------------------------------------------------------------
|
| 203 |
+
|
| 204 |
+
# get time animation track
|
| 205 |
+
timeAnimationCue1 = GetTimeTrack()
|
| 206 |
+
|
| 207 |
+
# initialize the animation scene
|
| 208 |
+
|
| 209 |
+
# get the time-keeper
|
| 210 |
+
timeKeeper1 = GetTimeKeeper()
|
| 211 |
+
|
| 212 |
+
# initialize the timekeeper
|
| 213 |
+
|
| 214 |
+
# initialize the animation track
|
| 215 |
+
|
| 216 |
+
# get animation scene
|
| 217 |
+
animationScene1 = GetAnimationScene()
|
| 218 |
+
|
| 219 |
+
# initialize the animation scene
|
| 220 |
+
animationScene1.ViewModules = renderView1
|
| 221 |
+
animationScene1.Cues = timeAnimationCue1
|
| 222 |
+
animationScene1.AnimationTime = 0.0
|
| 223 |
+
|
| 224 |
+
# ----------------------------------------------------------------
|
| 225 |
+
# restore active source
|
| 226 |
+
SetActiveSource(None)
|
| 227 |
+
# ----------------------------------------------------------------
|
| 228 |
+
|
| 229 |
+
|
| 230 |
+
# ============= Render and Save =============
|
| 231 |
+
RenderAllViews()
|
| 232 |
+
SaveScreenshot('/home/dullpigeon/Desktop/SciVisAgentTask/supernova100/supernova100_streamline.png', renderView1, ImageResolution=[1280, 1280])
|
| 233 |
+
print('Screenshot saved')
|
| 234 |
+
|
| 235 |
+
SaveState('/home/dullpigeon/Desktop/SciVisAgentTask/supernova100/supernova100_streamline.pvsm')
|
| 236 |
+
print('State saved')
|
main/supernova100/data/supernova100.raw
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:78f980b0038b4341f580778f650751615ffc4639c2d41e3837c1a89537a20046
|
| 3 |
+
size 12000000
|
main/supernova100/data/supernova100.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
100 100 100
|
main/supernova100/task_description.txt
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Load the Supernova velocity vector field from "supernova100/data/supernova100.raw", the information about this dataset:
|
| 2 |
+
Supernova Velocity (Vector)
|
| 3 |
+
Data Scalar Type: float
|
| 4 |
+
Data Byte Order: Little Endian
|
| 5 |
+
Data Extent: 100x100x100
|
| 6 |
+
Number of Scalar Components: 3
|
| 7 |
+
Data loading is very important, make sure you correctly load the dataset according to their features.
|
| 8 |
+
|
| 9 |
+
Create streamlines using a "Stream Tracer" filter with "Point Cloud" seed type. Set the seed center to [50, 50, 50], with 200 seed points and a radius of 45.0. Set maximum streamline length to 100.0.
|
| 10 |
+
|
| 11 |
+
Add a "Tube" filter on the stream tracer. Set tube radius to 0.3 with 12 sides.
|
| 12 |
+
|
| 13 |
+
Color the tubes by Vorticity magnitude using a diverging colormap with the following RGB control points:
|
| 14 |
+
- Value 0.0 -> RGB(0.231, 0.298, 0.753) (blue)
|
| 15 |
+
- Value 0.05 -> RGB(0.865, 0.865, 0.865) (white)
|
| 16 |
+
- Value 0.5 -> RGB(0.706, 0.016, 0.149) (red)
|
| 17 |
+
|
| 18 |
+
Show the dataset bounding box as an outline (black).
|
| 19 |
+
|
| 20 |
+
In the pipeline browser panel, hide the stream tracer and only show the tube filter and the outline.
|
| 21 |
+
|
| 22 |
+
Render at 1280x1280.
|
| 23 |
+
|
| 24 |
+
Save the paraview state as "supernova100/results/{agent_mode}/supernova100.pvsm".
|
| 25 |
+
Save the visualization image as "supernova100/results/{agent_mode}/supernova100.png".
|
| 26 |
+
(Optional, if use python script) Save the python script as "supernova100/results/{agent_mode}/supernova100.py".
|
| 27 |
+
Do not save any other files, and always save the visualization image.
|
main/supernova100/visualization_goals.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
vision:
|
| 2 |
+
1. Central Structure: Is there a dense, chaotic cluster of streamlines near the center of the volume, matching the ground truth?
|
| 3 |
+
2. Radial Extensions: Are there long, straight streamline tubes extending radially outward from the central region, similar to the ground truth?
|
| 4 |
+
3. Color Mapping: Are the tubes colored by vorticity magnitude using a blue-white-red diverging colormap, with warm colors concentrated near the center and cool colors on the extended lines?
|
main/tornado/.DS_Store
DELETED
|
Binary file (8.2 kB)
|
|
|
main/tornado/GS/.DS_Store
DELETED
|
Binary file (6.15 kB)
|
|
|
main/tornado/GS/tornado_streamline.png
ADDED
|
Git LFS Details
|
main/tornado/GS/tornado_streamline.pvsm
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f5197d9590e853faed347fe46454f36cd3ac2317d1a471da35396a22aa09f2fa
|
| 3 |
+
size 572835
|
main/tornado/GS/tornado_streamline.py
ADDED
|
@@ -0,0 +1,350 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# state file generated using paraview version 5.12.1
|
| 2 |
+
import paraview
|
| 3 |
+
paraview.compatibility.major = 5
|
| 4 |
+
paraview.compatibility.minor = 12
|
| 5 |
+
|
| 6 |
+
#### import the simple module from the paraview
|
| 7 |
+
from paraview.simple import *
|
| 8 |
+
#### disable automatic camera reset on 'Show'
|
| 9 |
+
paraview.simple._DisableFirstRenderCameraReset()
|
| 10 |
+
|
| 11 |
+
# ----------------------------------------------------------------
|
| 12 |
+
# setup views used in the visualization
|
| 13 |
+
# ----------------------------------------------------------------
|
| 14 |
+
|
| 15 |
+
# get the material library
|
| 16 |
+
materialLibrary1 = GetMaterialLibrary()
|
| 17 |
+
|
| 18 |
+
# Create a new 'Render View'
|
| 19 |
+
renderView1 = CreateView('RenderView')
|
| 20 |
+
renderView1.ViewSize = [1287, 991]
|
| 21 |
+
renderView1.AxesGrid = 'Grid Axes 3D Actor'
|
| 22 |
+
renderView1.CenterOfRotation = [31.5, 31.5, 31.5]
|
| 23 |
+
renderView1.StereoType = 'Crystal Eyes'
|
| 24 |
+
renderView1.CameraPosition = [142.00635165079808, -36.455070670229986, 93.9571039660573]
|
| 25 |
+
renderView1.CameraFocalPoint = [31.4999999999997, 31.499999999999897, 31.499999999999904]
|
| 26 |
+
renderView1.CameraViewUp = [-0.35389758983672587, 0.25226015030630783, 0.9006227359306425]
|
| 27 |
+
renderView1.CameraFocalDisk = 1.0
|
| 28 |
+
renderView1.CameraParallelScale = 54.559600438419636
|
| 29 |
+
renderView1.LegendGrid = 'Legend Grid Actor'
|
| 30 |
+
renderView1.UseColorPaletteForBackground = 0
|
| 31 |
+
renderView1.Background = [1.0, 1.0, 1.0]
|
| 32 |
+
renderView1.BackEnd = 'OSPRay raycaster'
|
| 33 |
+
renderView1.OSPRayMaterialLibrary = materialLibrary1
|
| 34 |
+
|
| 35 |
+
SetActiveView(None)
|
| 36 |
+
|
| 37 |
+
# ----------------------------------------------------------------
|
| 38 |
+
# setup view layouts
|
| 39 |
+
# ----------------------------------------------------------------
|
| 40 |
+
|
| 41 |
+
# create new layout object 'Layout #1'
|
| 42 |
+
layout1 = CreateLayout(name='Layout #1')
|
| 43 |
+
layout1.AssignView(0, renderView1)
|
| 44 |
+
layout1.SetSize(1287, 991)
|
| 45 |
+
|
| 46 |
+
# ----------------------------------------------------------------
|
| 47 |
+
# restore active view
|
| 48 |
+
SetActiveView(renderView1)
|
| 49 |
+
# ----------------------------------------------------------------
|
| 50 |
+
|
| 51 |
+
# ----------------------------------------------------------------
|
| 52 |
+
# setup the data processing pipelines
|
| 53 |
+
# ----------------------------------------------------------------
|
| 54 |
+
|
| 55 |
+
# create a new 'Image Reader'
|
| 56 |
+
tornadoraw = ImageReader(registrationName='tornado.raw', FileNames=['/home/dullpigeon/Desktop/SciVisAgentTask/tornado/tornado.raw'])
|
| 57 |
+
tornadoraw.DataScalarType = 'float'
|
| 58 |
+
tornadoraw.DataByteOrder = 'LittleEndian'
|
| 59 |
+
tornadoraw.NumberOfScalarComponents = 3
|
| 60 |
+
tornadoraw.ScalarArrayName = 'Velocity'
|
| 61 |
+
tornadoraw.DataExtent = [0, 63, 0, 63, 0, 63]
|
| 62 |
+
|
| 63 |
+
# create a new 'Stream Tracer'
|
| 64 |
+
streamTracer1 = StreamTracer(registrationName='StreamTracer1', Input=tornadoraw,
|
| 65 |
+
SeedType='Point Cloud')
|
| 66 |
+
streamTracer1.Vectors = ['POINTS', 'Velocity']
|
| 67 |
+
streamTracer1.MaximumStreamlineLength = 512.0
|
| 68 |
+
|
| 69 |
+
# init the 'Point Cloud' selected for 'SeedType'
|
| 70 |
+
streamTracer1.SeedType.Center = [31.5, 31.5, 47.25]
|
| 71 |
+
streamTracer1.SeedType.Radius = 12.6
|
| 72 |
+
|
| 73 |
+
# create a new 'Tube'
|
| 74 |
+
tube1 = Tube(registrationName='Tube1', Input=streamTracer1)
|
| 75 |
+
tube1.Scalars = ['POINTS', 'AngularVelocity']
|
| 76 |
+
tube1.Vectors = ['POINTS', 'Normals']
|
| 77 |
+
tube1.Radius = 0.25
|
| 78 |
+
|
| 79 |
+
# create a new 'Glyph'
|
| 80 |
+
glyph1 = Glyph(registrationName='Glyph1', Input=tornadoraw,
|
| 81 |
+
GlyphType='Arrow')
|
| 82 |
+
glyph1.OrientationArray = ['POINTS', 'Velocity']
|
| 83 |
+
glyph1.ScaleArray = ['POINTS', 'Velocity']
|
| 84 |
+
glyph1.ScaleFactor = 25.0
|
| 85 |
+
glyph1.GlyphTransform = 'Transform2'
|
| 86 |
+
glyph1.MaximumNumberOfSamplePoints = 2500
|
| 87 |
+
|
| 88 |
+
# init the 'Arrow' selected for 'GlyphType'
|
| 89 |
+
glyph1.GlyphType.TipResolution = 24
|
| 90 |
+
glyph1.GlyphType.TipRadius = 0.08
|
| 91 |
+
glyph1.GlyphType.TipLength = 0.2
|
| 92 |
+
glyph1.GlyphType.ShaftResolution = 8
|
| 93 |
+
|
| 94 |
+
# create a new 'Outline'
|
| 95 |
+
outline1 = Outline(registrationName='Outline1', Input=tornadoraw)
|
| 96 |
+
|
| 97 |
+
# ----------------------------------------------------------------
|
| 98 |
+
# setup the visualization in view 'renderView1'
|
| 99 |
+
# ----------------------------------------------------------------
|
| 100 |
+
|
| 101 |
+
# show data from glyph1
|
| 102 |
+
glyph1Display = Show(glyph1, renderView1, 'GeometryRepresentation')
|
| 103 |
+
|
| 104 |
+
# get 2D transfer function for 'Velocity'
|
| 105 |
+
velocityTF2D = GetTransferFunction2D('Velocity')
|
| 106 |
+
velocityTF2D.ScalarRangeInitialized = 1
|
| 107 |
+
velocityTF2D.Range = [0.02983434216897271, 0.31328205773514267, 0.0, 1.0]
|
| 108 |
+
|
| 109 |
+
# get color transfer function/color map for 'Velocity'
|
| 110 |
+
velocityLUT = GetColorTransferFunction('Velocity')
|
| 111 |
+
velocityLUT.TransferFunction2D = velocityTF2D
|
| 112 |
+
velocityLUT.RGBPoints = [0.02983434216897271, 0.23137254902, 0.298039215686, 0.752941176471, 0.16801510751247406, 0.865, 0.865, 0.865, 0.3132820577351427, 0.705882352941, 0.0156862745098, 0.149019607843]
|
| 113 |
+
velocityLUT.ScalarRangeInitialized = 1.0
|
| 114 |
+
|
| 115 |
+
# trace defaults for the display properties.
|
| 116 |
+
glyph1Display.Representation = 'Surface'
|
| 117 |
+
glyph1Display.ColorArrayName = ['POINTS', 'Velocity']
|
| 118 |
+
glyph1Display.LookupTable = velocityLUT
|
| 119 |
+
glyph1Display.SelectTCoordArray = 'None'
|
| 120 |
+
glyph1Display.SelectNormalArray = 'None'
|
| 121 |
+
glyph1Display.SelectTangentArray = 'None'
|
| 122 |
+
glyph1Display.OSPRayScaleArray = 'Velocity'
|
| 123 |
+
glyph1Display.OSPRayScaleFunction = 'Piecewise Function'
|
| 124 |
+
glyph1Display.Assembly = ''
|
| 125 |
+
glyph1Display.SelectOrientationVectors = 'None'
|
| 126 |
+
glyph1Display.ScaleFactor = 6.3945152282714846
|
| 127 |
+
glyph1Display.SelectScaleArray = 'Velocity'
|
| 128 |
+
glyph1Display.GlyphType = 'Arrow'
|
| 129 |
+
glyph1Display.GlyphTableIndexArray = 'Velocity'
|
| 130 |
+
glyph1Display.GaussianRadius = 0.3197257614135742
|
| 131 |
+
glyph1Display.SetScaleArray = ['POINTS', 'Velocity']
|
| 132 |
+
glyph1Display.ScaleTransferFunction = 'Piecewise Function'
|
| 133 |
+
glyph1Display.OpacityArray = ['POINTS', 'Velocity']
|
| 134 |
+
glyph1Display.OpacityTransferFunction = 'Piecewise Function'
|
| 135 |
+
glyph1Display.DataAxesGrid = 'Grid Axes Representation'
|
| 136 |
+
glyph1Display.PolarAxes = 'Polar Axes Representation'
|
| 137 |
+
glyph1Display.SelectInputVectors = ['POINTS', 'Velocity']
|
| 138 |
+
glyph1Display.WriteLog = ''
|
| 139 |
+
|
| 140 |
+
# init the 'Piecewise Function' selected for 'ScaleTransferFunction'
|
| 141 |
+
glyph1Display.ScaleTransferFunction.Points = [-0.3067080080509186, 0.0, 0.5, 0.0, 0.29407399892807007, 1.0, 0.5, 0.0]
|
| 142 |
+
|
| 143 |
+
# init the 'Piecewise Function' selected for 'OpacityTransferFunction'
|
| 144 |
+
glyph1Display.OpacityTransferFunction.Points = [-0.3067080080509186, 0.0, 0.5, 0.0, 0.29407399892807007, 1.0, 0.5, 0.0]
|
| 145 |
+
|
| 146 |
+
# init the 'Polar Axes Representation' selected for 'PolarAxes'
|
| 147 |
+
glyph1Display.PolarAxes.EnableOverallColor = 0
|
| 148 |
+
glyph1Display.PolarAxes.DeltaRangeMajor = 10.0
|
| 149 |
+
glyph1Display.PolarAxes.DeltaRangeMinor = 5.0
|
| 150 |
+
glyph1Display.PolarAxes.ArcTickMatchesRadialAxes = 0
|
| 151 |
+
|
| 152 |
+
# show data from streamTracer1
|
| 153 |
+
streamTracer1Display = Show(streamTracer1, renderView1, 'GeometryRepresentation')
|
| 154 |
+
|
| 155 |
+
# trace defaults for the display properties.
|
| 156 |
+
streamTracer1Display.Representation = 'Surface'
|
| 157 |
+
streamTracer1Display.ColorArrayName = ['POINTS', 'Velocity']
|
| 158 |
+
streamTracer1Display.LookupTable = velocityLUT
|
| 159 |
+
streamTracer1Display.PointSize = 3.0
|
| 160 |
+
streamTracer1Display.LineWidth = 5.0
|
| 161 |
+
streamTracer1Display.RenderLinesAsTubes = 1
|
| 162 |
+
streamTracer1Display.SelectTCoordArray = 'None'
|
| 163 |
+
streamTracer1Display.SelectNormalArray = 'None'
|
| 164 |
+
streamTracer1Display.SelectTangentArray = 'None'
|
| 165 |
+
streamTracer1Display.OSPRayScaleArray = 'Velocity'
|
| 166 |
+
streamTracer1Display.OSPRayScaleFunction = 'Piecewise Function'
|
| 167 |
+
streamTracer1Display.Assembly = ''
|
| 168 |
+
streamTracer1Display.SelectOrientationVectors = 'Normals'
|
| 169 |
+
streamTracer1Display.ScaleFactor = 6.1539682984352115
|
| 170 |
+
streamTracer1Display.SelectScaleArray = 'Velocity'
|
| 171 |
+
streamTracer1Display.GlyphType = 'Arrow'
|
| 172 |
+
streamTracer1Display.GlyphTableIndexArray = 'Velocity'
|
| 173 |
+
streamTracer1Display.GaussianRadius = 0.3076984149217606
|
| 174 |
+
streamTracer1Display.SetScaleArray = ['POINTS', 'Velocity']
|
| 175 |
+
streamTracer1Display.ScaleTransferFunction = 'Piecewise Function'
|
| 176 |
+
streamTracer1Display.OpacityArray = ['POINTS', 'Velocity']
|
| 177 |
+
streamTracer1Display.OpacityTransferFunction = 'Piecewise Function'
|
| 178 |
+
streamTracer1Display.DataAxesGrid = 'Grid Axes Representation'
|
| 179 |
+
streamTracer1Display.PolarAxes = 'Polar Axes Representation'
|
| 180 |
+
streamTracer1Display.SelectInputVectors = ['POINTS', 'Normals']
|
| 181 |
+
streamTracer1Display.WriteLog = ''
|
| 182 |
+
|
| 183 |
+
# init the 'Piecewise Function' selected for 'ScaleTransferFunction'
|
| 184 |
+
streamTracer1Display.ScaleTransferFunction.Points = [-0.2852635979652405, 0.0, 0.5, 0.0, 0.26630979776382446, 1.0, 0.5, 0.0]
|
| 185 |
+
|
| 186 |
+
# init the 'Piecewise Function' selected for 'OpacityTransferFunction'
|
| 187 |
+
streamTracer1Display.OpacityTransferFunction.Points = [-0.2852635979652405, 0.0, 0.5, 0.0, 0.26630979776382446, 1.0, 0.5, 0.0]
|
| 188 |
+
|
| 189 |
+
# init the 'Polar Axes Representation' selected for 'PolarAxes'
|
| 190 |
+
streamTracer1Display.PolarAxes.EnableOverallColor = 0
|
| 191 |
+
streamTracer1Display.PolarAxes.DeltaRangeMajor = 10.0
|
| 192 |
+
streamTracer1Display.PolarAxes.DeltaRangeMinor = 5.0
|
| 193 |
+
streamTracer1Display.PolarAxes.ArcTickMatchesRadialAxes = 0
|
| 194 |
+
|
| 195 |
+
# show data from outline1
|
| 196 |
+
outline1Display = Show(outline1, renderView1, 'GeometryRepresentation')
|
| 197 |
+
|
| 198 |
+
# trace defaults for the display properties.
|
| 199 |
+
outline1Display.Representation = 'Surface'
|
| 200 |
+
outline1Display.AmbientColor = [0.0, 0.0, 0.0]
|
| 201 |
+
outline1Display.ColorArrayName = [None, '']
|
| 202 |
+
outline1Display.DiffuseColor = [0.0, 0.0, 0.0]
|
| 203 |
+
outline1Display.SelectTCoordArray = 'None'
|
| 204 |
+
outline1Display.SelectNormalArray = 'None'
|
| 205 |
+
outline1Display.SelectTangentArray = 'None'
|
| 206 |
+
outline1Display.OSPRayScaleFunction = 'Piecewise Function'
|
| 207 |
+
outline1Display.Assembly = ''
|
| 208 |
+
outline1Display.SelectOrientationVectors = 'None'
|
| 209 |
+
outline1Display.ScaleFactor = 6.300000000000001
|
| 210 |
+
outline1Display.SelectScaleArray = 'None'
|
| 211 |
+
outline1Display.GlyphType = 'Arrow'
|
| 212 |
+
outline1Display.GlyphTableIndexArray = 'None'
|
| 213 |
+
outline1Display.GaussianRadius = 0.315
|
| 214 |
+
outline1Display.SetScaleArray = [None, '']
|
| 215 |
+
outline1Display.ScaleTransferFunction = 'Piecewise Function'
|
| 216 |
+
outline1Display.OpacityArray = [None, '']
|
| 217 |
+
outline1Display.OpacityTransferFunction = 'Piecewise Function'
|
| 218 |
+
outline1Display.DataAxesGrid = 'Grid Axes Representation'
|
| 219 |
+
outline1Display.PolarAxes = 'Polar Axes Representation'
|
| 220 |
+
outline1Display.SelectInputVectors = [None, '']
|
| 221 |
+
outline1Display.WriteLog = ''
|
| 222 |
+
|
| 223 |
+
# init the 'Polar Axes Representation' selected for 'PolarAxes'
|
| 224 |
+
outline1Display.PolarAxes.EnableOverallColor = 0
|
| 225 |
+
outline1Display.PolarAxes.DeltaRangeMajor = 10.0
|
| 226 |
+
outline1Display.PolarAxes.DeltaRangeMinor = 5.0
|
| 227 |
+
outline1Display.PolarAxes.ArcTickMatchesRadialAxes = 0
|
| 228 |
+
|
| 229 |
+
# show data from tube1
|
| 230 |
+
tube1Display = Show(tube1, renderView1, 'GeometryRepresentation')
|
| 231 |
+
|
| 232 |
+
# trace defaults for the display properties.
|
| 233 |
+
tube1Display.Representation = 'Surface'
|
| 234 |
+
tube1Display.ColorArrayName = ['POINTS', 'Velocity']
|
| 235 |
+
tube1Display.LookupTable = velocityLUT
|
| 236 |
+
tube1Display.SelectTCoordArray = 'None'
|
| 237 |
+
tube1Display.SelectNormalArray = 'TubeNormals'
|
| 238 |
+
tube1Display.SelectTangentArray = 'None'
|
| 239 |
+
tube1Display.OSPRayScaleArray = 'Velocity'
|
| 240 |
+
tube1Display.OSPRayScaleFunction = 'Piecewise Function'
|
| 241 |
+
tube1Display.Assembly = ''
|
| 242 |
+
tube1Display.SelectOrientationVectors = 'Normals'
|
| 243 |
+
tube1Display.ScaleFactor = 6.237804853916169
|
| 244 |
+
tube1Display.SelectScaleArray = 'Velocity'
|
| 245 |
+
tube1Display.GlyphType = 'Arrow'
|
| 246 |
+
tube1Display.GlyphTableIndexArray = 'Velocity'
|
| 247 |
+
tube1Display.GaussianRadius = 0.3118902426958084
|
| 248 |
+
tube1Display.SetScaleArray = ['POINTS', 'Velocity']
|
| 249 |
+
tube1Display.ScaleTransferFunction = 'Piecewise Function'
|
| 250 |
+
tube1Display.OpacityArray = ['POINTS', 'Velocity']
|
| 251 |
+
tube1Display.OpacityTransferFunction = 'Piecewise Function'
|
| 252 |
+
tube1Display.DataAxesGrid = 'Grid Axes Representation'
|
| 253 |
+
tube1Display.PolarAxes = 'Polar Axes Representation'
|
| 254 |
+
tube1Display.SelectInputVectors = ['POINTS', 'Normals']
|
| 255 |
+
tube1Display.WriteLog = ''
|
| 256 |
+
|
| 257 |
+
# init the 'Piecewise Function' selected for 'ScaleTransferFunction'
|
| 258 |
+
tube1Display.ScaleTransferFunction.Points = [-0.2852635979652405, 0.0, 0.5, 0.0, 0.26630979776382446, 1.0, 0.5, 0.0]
|
| 259 |
+
|
| 260 |
+
# init the 'Piecewise Function' selected for 'OpacityTransferFunction'
|
| 261 |
+
tube1Display.OpacityTransferFunction.Points = [-0.2852635979652405, 0.0, 0.5, 0.0, 0.26630979776382446, 1.0, 0.5, 0.0]
|
| 262 |
+
|
| 263 |
+
# init the 'Polar Axes Representation' selected for 'PolarAxes'
|
| 264 |
+
tube1Display.PolarAxes.EnableOverallColor = 0
|
| 265 |
+
tube1Display.PolarAxes.DeltaRangeMajor = 10.0
|
| 266 |
+
tube1Display.PolarAxes.DeltaRangeMinor = 5.0
|
| 267 |
+
tube1Display.PolarAxes.ArcTickMatchesRadialAxes = 0
|
| 268 |
+
|
| 269 |
+
# setup the color legend parameters for each legend in this view
|
| 270 |
+
|
| 271 |
+
# get color legend/bar for velocityLUT in view renderView1
|
| 272 |
+
velocityLUTColorBar = GetScalarBar(velocityLUT, renderView1)
|
| 273 |
+
velocityLUTColorBar.WindowLocation = 'Any Location'
|
| 274 |
+
velocityLUTColorBar.Position = [0.8508873456790124, 0.04661016949152543]
|
| 275 |
+
velocityLUTColorBar.Title = ''
|
| 276 |
+
velocityLUTColorBar.ComponentTitle = ''
|
| 277 |
+
velocityLUTColorBar.TitleColor = [0.0, 0.0, 0.0]
|
| 278 |
+
velocityLUTColorBar.LabelColor = [0.0, 0.0, 0.0]
|
| 279 |
+
velocityLUTColorBar.ScalarBarLength = 0.3300000000000002
|
| 280 |
+
|
| 281 |
+
# set color bar visibility
|
| 282 |
+
velocityLUTColorBar.Visibility = 1
|
| 283 |
+
|
| 284 |
+
# show color legend
|
| 285 |
+
glyph1Display.SetScalarBarVisibility(renderView1, True)
|
| 286 |
+
|
| 287 |
+
# show color legend
|
| 288 |
+
streamTracer1Display.SetScalarBarVisibility(renderView1, True)
|
| 289 |
+
|
| 290 |
+
# show color legend
|
| 291 |
+
tube1Display.SetScalarBarVisibility(renderView1, True)
|
| 292 |
+
|
| 293 |
+
# ----------------------------------------------------------------
|
| 294 |
+
# setup color maps and opacity maps used in the visualization
|
| 295 |
+
# note: the Get..() functions create a new object, if needed
|
| 296 |
+
# ----------------------------------------------------------------
|
| 297 |
+
|
| 298 |
+
# get opacity transfer function/opacity map for 'Velocity'
|
| 299 |
+
velocityPWF = GetOpacityTransferFunction('Velocity')
|
| 300 |
+
velocityPWF.Points = [0.02983434216897271, 0.0, 0.5, 0.0, 0.10185037553310394, 0.0, 0.5, 0.0, 0.10185037553310394, 0.0, 0.5, 0.0, 0.18130171298980713, 0.14189189672470093, 0.5, 0.0, 0.23887702822685242, 0.9076576828956604, 0.5, 0.0, 0.2893661558628082, 0.0, 0.5, 0.0, 0.3132820577351427, 0.0, 0.5, 0.0]
|
| 301 |
+
velocityPWF.ScalarRangeInitialized = 1
|
| 302 |
+
|
| 303 |
+
# ----------------------------------------------------------------
|
| 304 |
+
# setup animation scene, tracks and keyframes
|
| 305 |
+
# note: the Get..() functions create a new object, if needed
|
| 306 |
+
# ----------------------------------------------------------------
|
| 307 |
+
|
| 308 |
+
# get time animation track
|
| 309 |
+
timeAnimationCue1 = GetTimeTrack()
|
| 310 |
+
|
| 311 |
+
# initialize the animation scene
|
| 312 |
+
|
| 313 |
+
# get the time-keeper
|
| 314 |
+
timeKeeper1 = GetTimeKeeper()
|
| 315 |
+
|
| 316 |
+
# initialize the timekeeper
|
| 317 |
+
|
| 318 |
+
# initialize the animation track
|
| 319 |
+
|
| 320 |
+
# get animation scene
|
| 321 |
+
animationScene1 = GetAnimationScene()
|
| 322 |
+
|
| 323 |
+
# initialize the animation scene
|
| 324 |
+
animationScene1.ViewModules = renderView1
|
| 325 |
+
animationScene1.Cues = timeAnimationCue1
|
| 326 |
+
animationScene1.AnimationTime = 0.0
|
| 327 |
+
|
| 328 |
+
# ----------------------------------------------------------------
|
| 329 |
+
# restore active source
|
| 330 |
+
SetActiveSource(None)
|
| 331 |
+
# ----------------------------------------------------------------
|
| 332 |
+
|
| 333 |
+
# ============= Render and Save =============
|
| 334 |
+
Render()
|
| 335 |
+
|
| 336 |
+
OUTPUT_IMAGE = "/home/dullpigeon/Desktop/SciVisAgentTask/tornado/tornado_streamline.png"
|
| 337 |
+
OUTPUT_STATE = "/home/dullpigeon/Desktop/SciVisAgentTask/tornado/tornado_streamline.pvsm"
|
| 338 |
+
|
| 339 |
+
renderView = GetActiveView()
|
| 340 |
+
if renderView is None:
|
| 341 |
+
views = GetViews()
|
| 342 |
+
if views:
|
| 343 |
+
renderView = views[0]
|
| 344 |
+
|
| 345 |
+
SaveScreenshot(OUTPUT_IMAGE, renderView, ImageResolution=renderView.ViewSize,
|
| 346 |
+
OverrideColorPalette="WhiteBackground")
|
| 347 |
+
print(f"Screenshot saved to: {OUTPUT_IMAGE}")
|
| 348 |
+
|
| 349 |
+
SaveState(OUTPUT_STATE)
|
| 350 |
+
print(f"State saved to: {OUTPUT_STATE}")
|
main/tornado/data/{tornado_64x64x64_float32_scalar3.raw → tornado.raw}
RENAMED
|
File without changes
|
main/tornado/data/tornado.txt
CHANGED
|
Binary files a/main/tornado/data/tornado.txt and b/main/tornado/data/tornado.txt differ
|
|
|
main/tornado/task_description.txt
CHANGED
|
@@ -1,19 +1,19 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
Load the tornado dataset from "tornado/data/tornado_64x64x64_float32_scalar3.raw", the information about this dataset:
|
| 4 |
Tornado (Vector)
|
| 5 |
Data Scalar Type: float
|
| 6 |
-
Data Byte Order:
|
| 7 |
Data Extent: 64x64x64
|
| 8 |
Number of Scalar Components: 3
|
| 9 |
Data loading is very important, make sure you correctly load the dataset according to their features.
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
Then add a “stream tracer” filter under the tornado data to generate streamlines. Choose “Point Cloud” as “Seed Type”, and do not show sphere. Try to figure out the best position to place the critical points and the radius of the sphere for optimal visualization.
|
| 14 |
|
| 15 |
-
Add a
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Load the Tornado vector field from "tornado/data/tornado.raw", the information about this dataset:
|
|
|
|
|
|
|
| 2 |
Tornado (Vector)
|
| 3 |
Data Scalar Type: float
|
| 4 |
+
Data Byte Order: Little Endian
|
| 5 |
Data Extent: 64x64x64
|
| 6 |
Number of Scalar Components: 3
|
| 7 |
Data loading is very important, make sure you correctly load the dataset according to their features.
|
| 8 |
|
| 9 |
+
Create a streamline visualization using a "Stream Tracer" filter with "Point Cloud" seed type. Set the seed center to [31.5, 31.5, 47.25], radius 12.6, and maximum streamline length to 512.0. Add a "Tube" filter (radius 0.25) on the stream tracer. Color the tubes by Velocity magnitude using the 'Cool to Warm (Diverging)' colormap. Also display the stream tracer directly with line width 5.0 and "Render Lines As Tubes" enabled.
|
|
|
|
|
|
|
| 10 |
|
| 11 |
+
Add a "Glyph" filter on the original data using Arrow glyph type. Orient arrows by the Velocity vector and scale by Velocity magnitude with a scale factor of 25.0. Set maximum number of sample points to 2500. Color glyphs by Velocity magnitude using the same colormap.
|
| 12 |
|
| 13 |
+
Add an "Outline" filter to display the dataset bounding box (black).
|
| 14 |
|
| 15 |
+
Use a white background (RGB: 1.0, 1.0, 1.0).
|
| 16 |
+
Save the paraview state as "tornado/results/{agent_mode}/tornado.pvsm".
|
| 17 |
+
Save the visualization image as "tornado/results/{agent_mode}/tornado.png".
|
| 18 |
+
(Optional, if use python script) Save the python script as "tornado/results/{agent_mode}/tornado.py".
|
| 19 |
+
Do not save any other files, and always save the visualization image.
|
main/tornado/visualization_goals.txt
CHANGED
|
@@ -1,7 +1,4 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
2. Glyph
|
| 4 |
-
|
| 5 |
-
3. Streamline Visualization: Does the result show streamlines that follow the flow patterns effectively?
|
| 6 |
-
|
| 7 |
-
4. Tube Rendering: Are the streamlines rendered as tubes with appropriate thickness?
|
|
|
|
| 1 |
+
vision:
|
| 2 |
+
1. Vortex Structure: Is a funnel-shaped vortex core visible with streamlines spiraling around a central vertical axis, matching the ground truth?
|
| 3 |
+
2. Glyph Presence: Are arrow glyphs distributed throughout the volume showing velocity direction, similar to the ground truth?
|
| 4 |
+
3. Color Mapping: Are both the streamline tubes and arrow glyphs colored by velocity magnitude using a blue-to-red diverging colormap, matching the ground truth color distribution?
|
|
|
|
|
|
|
|
|
main/twoswirls/GS/twoswirls_streamsurface.png
ADDED
|
Git LFS Details
|
main/twoswirls/GS/twoswirls_streamsurface.pvsm
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d00da8282992874067ce3959dc60f9347cef6fa590579b7f108c1a055aa688b8
|
| 3 |
+
size 467600
|
main/twoswirls/GS/twoswirls_streamsurface.py
ADDED
|
@@ -0,0 +1,306 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# state file generated using paraview version 5.12.1
|
| 2 |
+
import paraview
|
| 3 |
+
paraview.compatibility.major = 5
|
| 4 |
+
paraview.compatibility.minor = 12
|
| 5 |
+
|
| 6 |
+
#### import the simple module from the paraview
|
| 7 |
+
from paraview.simple import *
|
| 8 |
+
#### disable automatic camera reset on 'Show'
|
| 9 |
+
paraview.simple._DisableFirstRenderCameraReset()
|
| 10 |
+
|
| 11 |
+
# ----------------------------------------------------------------
|
| 12 |
+
# setup views used in the visualization
|
| 13 |
+
# ----------------------------------------------------------------
|
| 14 |
+
|
| 15 |
+
# get the material library
|
| 16 |
+
materialLibrary1 = GetMaterialLibrary()
|
| 17 |
+
|
| 18 |
+
# Create a new 'Render View'
|
| 19 |
+
renderView1 = CreateView('RenderView')
|
| 20 |
+
renderView1.ViewSize = [1287, 991]
|
| 21 |
+
renderView1.AxesGrid = 'Grid Axes 3D Actor'
|
| 22 |
+
renderView1.KeyLightWarmth = 0.5
|
| 23 |
+
renderView1.KeyLightIntensity = 0.9
|
| 24 |
+
renderView1.StereoType = 'Crystal Eyes'
|
| 25 |
+
renderView1.CameraPosition = [30.506557822227478, -154.18388926659551, 144.98737090119556]
|
| 26 |
+
renderView1.CameraFocalPoint = [30.506557822227478, 31.5, 30.91251516342163]
|
| 27 |
+
renderView1.CameraViewUp = [0.0, 0.52999894000318, 0.847998304005088]
|
| 28 |
+
renderView1.CameraFocalDisk = 1.0
|
| 29 |
+
renderView1.CameraParallelScale = 56.403303005016504
|
| 30 |
+
renderView1.LegendGrid = 'Legend Grid Actor'
|
| 31 |
+
renderView1.Background = [1.0, 1.0, 1.0]
|
| 32 |
+
renderView1.BackEnd = 'OSPRay raycaster'
|
| 33 |
+
renderView1.OSPRayMaterialLibrary = materialLibrary1
|
| 34 |
+
|
| 35 |
+
SetActiveView(None)
|
| 36 |
+
|
| 37 |
+
# ----------------------------------------------------------------
|
| 38 |
+
# setup view layouts
|
| 39 |
+
# ----------------------------------------------------------------
|
| 40 |
+
|
| 41 |
+
# create new layout object 'Layout'
|
| 42 |
+
layout = CreateLayout(name='Layout')
|
| 43 |
+
layout.AssignView(0, renderView1)
|
| 44 |
+
layout.SetSize(1287, 991)
|
| 45 |
+
|
| 46 |
+
# ----------------------------------------------------------------
|
| 47 |
+
# restore active view
|
| 48 |
+
SetActiveView(renderView1)
|
| 49 |
+
# ----------------------------------------------------------------
|
| 50 |
+
|
| 51 |
+
# ----------------------------------------------------------------
|
| 52 |
+
# setup the data processing pipelines
|
| 53 |
+
# ----------------------------------------------------------------
|
| 54 |
+
|
| 55 |
+
# create a new 'Image Reader'
|
| 56 |
+
imageReader1 = ImageReader(registrationName='ImageReader1', FileNames=['/home/dullpigeon/Desktop/SciVisAgentTask/twoswirls/twoswirls.raw'])
|
| 57 |
+
imageReader1.DataScalarType = 'float'
|
| 58 |
+
imageReader1.DataByteOrder = 'LittleEndian'
|
| 59 |
+
imageReader1.NumberOfScalarComponents = 3
|
| 60 |
+
imageReader1.DataExtent = [0, 63, 0, 63, 0, 63]
|
| 61 |
+
|
| 62 |
+
# create a new 'Stream Tracer'
|
| 63 |
+
streamTracer1 = StreamTracer(registrationName='StreamTracer1', Input=imageReader1,
|
| 64 |
+
SeedType='Line')
|
| 65 |
+
streamTracer1.Vectors = ['POINTS', 'ImageFile']
|
| 66 |
+
streamTracer1.MaximumStreamlineLength = 200.0
|
| 67 |
+
|
| 68 |
+
# init the 'Line' selected for 'SeedType'
|
| 69 |
+
streamTracer1.SeedType.Point1 = [16.0, 10.0, 32.0]
|
| 70 |
+
streamTracer1.SeedType.Point2 = [16.0, 54.0, 32.0]
|
| 71 |
+
streamTracer1.SeedType.Resolution = 25
|
| 72 |
+
|
| 73 |
+
# create a new 'Stream Tracer'
|
| 74 |
+
streamTracer3 = StreamTracer(registrationName='StreamTracer3', Input=imageReader1,
|
| 75 |
+
SeedType='Line')
|
| 76 |
+
streamTracer3.Vectors = ['POINTS', 'ImageFile']
|
| 77 |
+
streamTracer3.MaximumStreamlineLength = 200.0
|
| 78 |
+
|
| 79 |
+
# init the 'Line' selected for 'SeedType'
|
| 80 |
+
streamTracer3.SeedType.Point1 = [48.0, 10.0, 32.0]
|
| 81 |
+
streamTracer3.SeedType.Point2 = [48.0, 54.0, 32.0]
|
| 82 |
+
streamTracer3.SeedType.Resolution = 25
|
| 83 |
+
|
| 84 |
+
# create a new 'Ribbon'
|
| 85 |
+
ribbon3 = Ribbon(registrationName='Ribbon3', Input=streamTracer3)
|
| 86 |
+
ribbon3.Scalars = ['POINTS', 'IntegrationTime']
|
| 87 |
+
ribbon3.Vectors = ['POINTS', 'Normals']
|
| 88 |
+
ribbon3.Width = 2.5
|
| 89 |
+
|
| 90 |
+
# create a new 'Stream Tracer'
|
| 91 |
+
streamTracer4 = StreamTracer(registrationName='StreamTracer4', Input=imageReader1,
|
| 92 |
+
SeedType='Line')
|
| 93 |
+
streamTracer4.Vectors = ['POINTS', 'ImageFile']
|
| 94 |
+
streamTracer4.MaximumStreamlineLength = 200.0
|
| 95 |
+
|
| 96 |
+
# init the 'Line' selected for 'SeedType'
|
| 97 |
+
streamTracer4.SeedType.Point1 = [44.0, 32.0, 10.0]
|
| 98 |
+
streamTracer4.SeedType.Point2 = [44.0, 32.0, 54.0]
|
| 99 |
+
streamTracer4.SeedType.Resolution = 25
|
| 100 |
+
|
| 101 |
+
# create a new 'Ribbon'
|
| 102 |
+
ribbon4 = Ribbon(registrationName='Ribbon4', Input=streamTracer4)
|
| 103 |
+
ribbon4.Scalars = ['POINTS', 'IntegrationTime']
|
| 104 |
+
ribbon4.Vectors = ['POINTS', 'Normals']
|
| 105 |
+
ribbon4.Width = 2.5
|
| 106 |
+
|
| 107 |
+
# create a new 'Stream Tracer'
|
| 108 |
+
streamTracer2 = StreamTracer(registrationName='StreamTracer2', Input=imageReader1,
|
| 109 |
+
SeedType='Line')
|
| 110 |
+
streamTracer2.Vectors = ['POINTS', 'ImageFile']
|
| 111 |
+
streamTracer2.MaximumStreamlineLength = 200.0
|
| 112 |
+
|
| 113 |
+
# init the 'Line' selected for 'SeedType'
|
| 114 |
+
streamTracer2.SeedType.Point1 = [20.0, 32.0, 10.0]
|
| 115 |
+
streamTracer2.SeedType.Point2 = [20.0, 32.0, 54.0]
|
| 116 |
+
streamTracer2.SeedType.Resolution = 25
|
| 117 |
+
|
| 118 |
+
# create a new 'Ribbon'
|
| 119 |
+
ribbon2 = Ribbon(registrationName='Ribbon2', Input=streamTracer2)
|
| 120 |
+
ribbon2.Scalars = ['POINTS', 'IntegrationTime']
|
| 121 |
+
ribbon2.Vectors = ['POINTS', 'Normals']
|
| 122 |
+
ribbon2.Width = 2.5
|
| 123 |
+
|
| 124 |
+
# create a new 'Ribbon'
|
| 125 |
+
ribbon1 = Ribbon(registrationName='Ribbon1', Input=streamTracer1)
|
| 126 |
+
ribbon1.Scalars = ['POINTS', 'IntegrationTime']
|
| 127 |
+
ribbon1.Vectors = ['POINTS', 'Normals']
|
| 128 |
+
ribbon1.Width = 2.5
|
| 129 |
+
|
| 130 |
+
# ----------------------------------------------------------------
|
| 131 |
+
# setup the visualization in view 'renderView1'
|
| 132 |
+
# ----------------------------------------------------------------
|
| 133 |
+
|
| 134 |
+
# show data from ribbon1
|
| 135 |
+
ribbon1Display = Show(ribbon1, renderView1, 'GeometryRepresentation')
|
| 136 |
+
|
| 137 |
+
# trace defaults for the display properties.
|
| 138 |
+
ribbon1Display.Representation = 'Surface'
|
| 139 |
+
ribbon1Display.AmbientColor = [0.2, 0.7, 0.3]
|
| 140 |
+
ribbon1Display.ColorArrayName = ['POINTS', '']
|
| 141 |
+
ribbon1Display.DiffuseColor = [0.2, 0.7, 0.3]
|
| 142 |
+
ribbon1Display.Opacity = 0.35
|
| 143 |
+
ribbon1Display.Specular = 0.4
|
| 144 |
+
ribbon1Display.SpecularPower = 30.0
|
| 145 |
+
ribbon1Display.Ambient = 0.15
|
| 146 |
+
ribbon1Display.Diffuse = 0.75
|
| 147 |
+
ribbon1Display.SelectTCoordArray = 'None'
|
| 148 |
+
ribbon1Display.SelectNormalArray = 'None'
|
| 149 |
+
ribbon1Display.SelectTangentArray = 'None'
|
| 150 |
+
ribbon1Display.OSPRayScaleArray = 'ImageFile'
|
| 151 |
+
ribbon1Display.OSPRayScaleFunction = 'Piecewise Function'
|
| 152 |
+
ribbon1Display.Assembly = ''
|
| 153 |
+
ribbon1Display.SelectOrientationVectors = 'Normals'
|
| 154 |
+
ribbon1Display.ScaleFactor = 5.75545814037323
|
| 155 |
+
ribbon1Display.SelectScaleArray = 'ImageFile'
|
| 156 |
+
ribbon1Display.GlyphType = 'Arrow'
|
| 157 |
+
ribbon1Display.GlyphTableIndexArray = 'ImageFile'
|
| 158 |
+
ribbon1Display.GaussianRadius = 0.2877729070186615
|
| 159 |
+
ribbon1Display.SetScaleArray = ['POINTS', 'ImageFile']
|
| 160 |
+
ribbon1Display.ScaleTransferFunction = 'Piecewise Function'
|
| 161 |
+
ribbon1Display.OpacityArray = ['POINTS', 'ImageFile']
|
| 162 |
+
ribbon1Display.OpacityTransferFunction = 'Piecewise Function'
|
| 163 |
+
ribbon1Display.DataAxesGrid = 'Grid Axes Representation'
|
| 164 |
+
ribbon1Display.PolarAxes = 'Polar Axes Representation'
|
| 165 |
+
ribbon1Display.SelectInputVectors = ['POINTS', 'Normals']
|
| 166 |
+
ribbon1Display.WriteLog = ''
|
| 167 |
+
|
| 168 |
+
# init the 'Piecewise Function' selected for 'ScaleTransferFunction'
|
| 169 |
+
ribbon1Display.ScaleTransferFunction.Points = [-0.2651785612106323, 0.0, 0.5, 0.0, 0.4244382977485657, 1.0, 0.5, 0.0]
|
| 170 |
+
|
| 171 |
+
# init the 'Piecewise Function' selected for 'OpacityTransferFunction'
|
| 172 |
+
ribbon1Display.OpacityTransferFunction.Points = [-0.2651785612106323, 0.0, 0.5, 0.0, 0.4244382977485657, 1.0, 0.5, 0.0]
|
| 173 |
+
|
| 174 |
+
# show data from ribbon3
|
| 175 |
+
ribbon3Display = Show(ribbon3, renderView1, 'GeometryRepresentation')
|
| 176 |
+
|
| 177 |
+
# trace defaults for the display properties.
|
| 178 |
+
ribbon3Display.Representation = 'Surface'
|
| 179 |
+
ribbon3Display.AmbientColor = [0.2, 0.4, 0.85]
|
| 180 |
+
ribbon3Display.ColorArrayName = ['POINTS', '']
|
| 181 |
+
ribbon3Display.DiffuseColor = [0.2, 0.4, 0.85]
|
| 182 |
+
ribbon3Display.Opacity = 0.35
|
| 183 |
+
ribbon3Display.Specular = 0.4
|
| 184 |
+
ribbon3Display.SpecularPower = 30.0
|
| 185 |
+
ribbon3Display.Ambient = 0.15
|
| 186 |
+
ribbon3Display.Diffuse = 0.75
|
| 187 |
+
ribbon3Display.SelectTCoordArray = 'None'
|
| 188 |
+
ribbon3Display.SelectNormalArray = 'None'
|
| 189 |
+
ribbon3Display.SelectTangentArray = 'None'
|
| 190 |
+
ribbon3Display.OSPRayScaleArray = 'ImageFile'
|
| 191 |
+
ribbon3Display.OSPRayScaleFunction = 'Piecewise Function'
|
| 192 |
+
ribbon3Display.Assembly = ''
|
| 193 |
+
ribbon3Display.SelectOrientationVectors = 'Normals'
|
| 194 |
+
ribbon3Display.ScaleFactor = 6.492923521995545
|
| 195 |
+
ribbon3Display.SelectScaleArray = 'ImageFile'
|
| 196 |
+
ribbon3Display.GlyphType = 'Arrow'
|
| 197 |
+
ribbon3Display.GlyphTableIndexArray = 'ImageFile'
|
| 198 |
+
ribbon3Display.GaussianRadius = 0.32464617609977725
|
| 199 |
+
ribbon3Display.SetScaleArray = ['POINTS', 'ImageFile']
|
| 200 |
+
ribbon3Display.ScaleTransferFunction = 'Piecewise Function'
|
| 201 |
+
ribbon3Display.OpacityArray = ['POINTS', 'ImageFile']
|
| 202 |
+
ribbon3Display.OpacityTransferFunction = 'Piecewise Function'
|
| 203 |
+
ribbon3Display.DataAxesGrid = 'Grid Axes Representation'
|
| 204 |
+
ribbon3Display.PolarAxes = 'Polar Axes Representation'
|
| 205 |
+
ribbon3Display.SelectInputVectors = ['POINTS', 'Normals']
|
| 206 |
+
ribbon3Display.WriteLog = ''
|
| 207 |
+
|
| 208 |
+
# init the 'Piecewise Function' selected for 'ScaleTransferFunction'
|
| 209 |
+
ribbon3Display.ScaleTransferFunction.Points = [-0.332985520362854, 0.0, 0.5, 0.0, 0.2668702304363251, 1.0, 0.5, 0.0]
|
| 210 |
+
|
| 211 |
+
# init the 'Piecewise Function' selected for 'OpacityTransferFunction'
|
| 212 |
+
ribbon3Display.OpacityTransferFunction.Points = [-0.332985520362854, 0.0, 0.5, 0.0, 0.2668702304363251, 1.0, 0.5, 0.0]
|
| 213 |
+
|
| 214 |
+
# show data from imageReader1
|
| 215 |
+
imageReader1Display = Show(imageReader1, renderView1, 'UniformGridRepresentation')
|
| 216 |
+
|
| 217 |
+
# trace defaults for the display properties.
|
| 218 |
+
imageReader1Display.Representation = 'Outline'
|
| 219 |
+
imageReader1Display.AmbientColor = [0.0, 0.0, 0.0]
|
| 220 |
+
imageReader1Display.ColorArrayName = ['POINTS', '']
|
| 221 |
+
imageReader1Display.DiffuseColor = [0.0, 0.0, 0.0]
|
| 222 |
+
imageReader1Display.Opacity = 0.3
|
| 223 |
+
imageReader1Display.SelectTCoordArray = 'None'
|
| 224 |
+
imageReader1Display.SelectNormalArray = 'None'
|
| 225 |
+
imageReader1Display.SelectTangentArray = 'None'
|
| 226 |
+
imageReader1Display.OSPRayScaleArray = 'ImageFile'
|
| 227 |
+
imageReader1Display.OSPRayScaleFunction = 'Piecewise Function'
|
| 228 |
+
imageReader1Display.Assembly = ''
|
| 229 |
+
imageReader1Display.SelectOrientationVectors = 'ImageFile'
|
| 230 |
+
imageReader1Display.ScaleFactor = 6.300000000000001
|
| 231 |
+
imageReader1Display.SelectScaleArray = 'ImageFile'
|
| 232 |
+
imageReader1Display.GlyphType = 'Arrow'
|
| 233 |
+
imageReader1Display.GlyphTableIndexArray = 'ImageFile'
|
| 234 |
+
imageReader1Display.GaussianRadius = 0.315
|
| 235 |
+
imageReader1Display.SetScaleArray = ['POINTS', 'ImageFile']
|
| 236 |
+
imageReader1Display.ScaleTransferFunction = 'Piecewise Function'
|
| 237 |
+
imageReader1Display.OpacityArray = ['POINTS', 'ImageFile']
|
| 238 |
+
imageReader1Display.OpacityTransferFunction = 'Piecewise Function'
|
| 239 |
+
imageReader1Display.DataAxesGrid = 'Grid Axes Representation'
|
| 240 |
+
imageReader1Display.PolarAxes = 'Polar Axes Representation'
|
| 241 |
+
imageReader1Display.ScalarOpacityUnitDistance = 1.7320508075688774
|
| 242 |
+
imageReader1Display.OpacityArrayName = ['POINTS', 'ImageFile']
|
| 243 |
+
imageReader1Display.ColorArray2Name = ['POINTS', 'ImageFile']
|
| 244 |
+
imageReader1Display.IsosurfaceValues = [0.036316871643066406]
|
| 245 |
+
imageReader1Display.SliceFunction = 'Plane'
|
| 246 |
+
imageReader1Display.Slice = 31
|
| 247 |
+
imageReader1Display.SelectInputVectors = ['POINTS', 'ImageFile']
|
| 248 |
+
imageReader1Display.WriteLog = ''
|
| 249 |
+
|
| 250 |
+
# init the 'Piecewise Function' selected for 'ScaleTransferFunction'
|
| 251 |
+
imageReader1Display.ScaleTransferFunction.Points = [-0.3535566031932831, 0.0, 0.5, 0.0, 0.4261903464794159, 1.0, 0.5, 0.0]
|
| 252 |
+
|
| 253 |
+
# init the 'Piecewise Function' selected for 'OpacityTransferFunction'
|
| 254 |
+
imageReader1Display.OpacityTransferFunction.Points = [-0.3535566031932831, 0.0, 0.5, 0.0, 0.4261903464794159, 1.0, 0.5, 0.0]
|
| 255 |
+
|
| 256 |
+
# init the 'Plane' selected for 'SliceFunction'
|
| 257 |
+
imageReader1Display.SliceFunction.Origin = [31.5, 31.5, 31.5]
|
| 258 |
+
|
| 259 |
+
# ----------------------------------------------------------------
|
| 260 |
+
# setup animation scene, tracks and keyframes
|
| 261 |
+
# note: the Get..() functions create a new object, if needed
|
| 262 |
+
# ----------------------------------------------------------------
|
| 263 |
+
|
| 264 |
+
# get the time-keeper
|
| 265 |
+
timeKeeper1 = GetTimeKeeper()
|
| 266 |
+
|
| 267 |
+
# initialize the timekeeper
|
| 268 |
+
|
| 269 |
+
# get time animation track
|
| 270 |
+
timeAnimationCue1 = GetTimeTrack()
|
| 271 |
+
|
| 272 |
+
# initialize the animation track
|
| 273 |
+
|
| 274 |
+
# get animation scene
|
| 275 |
+
animationScene1 = GetAnimationScene()
|
| 276 |
+
|
| 277 |
+
# initialize the animation scene
|
| 278 |
+
animationScene1.ViewModules = renderView1
|
| 279 |
+
animationScene1.Cues = timeAnimationCue1
|
| 280 |
+
animationScene1.AnimationTime = 0.0
|
| 281 |
+
|
| 282 |
+
# initialize the animation scene
|
| 283 |
+
|
| 284 |
+
# ----------------------------------------------------------------
|
| 285 |
+
# restore active source
|
| 286 |
+
SetActiveSource(None)
|
| 287 |
+
# ----------------------------------------------------------------
|
| 288 |
+
|
| 289 |
+
# ============= Render and Save =============
|
| 290 |
+
Render()
|
| 291 |
+
|
| 292 |
+
OUTPUT_IMAGE = '/home/dullpigeon/Desktop/SciVisAgentTask/twoswirls/twoswirls_streamsurface.png'
|
| 293 |
+
OUTPUT_STATE = '/home/dullpigeon/Desktop/SciVisAgentTask/twoswirls/twoswirls_streamsurface.pvsm'
|
| 294 |
+
|
| 295 |
+
# Find the render view
|
| 296 |
+
renderView = GetActiveView()
|
| 297 |
+
if renderView is None:
|
| 298 |
+
views = GetViews()
|
| 299 |
+
if views:
|
| 300 |
+
renderView = views[0]
|
| 301 |
+
|
| 302 |
+
SaveScreenshot(OUTPUT_IMAGE, renderView, ImageResolution=renderView.ViewSize)
|
| 303 |
+
print(f"Screenshot saved to: {OUTPUT_IMAGE}")
|
| 304 |
+
|
| 305 |
+
SaveState(OUTPUT_STATE)
|
| 306 |
+
print(f"State saved to: {OUTPUT_STATE}")
|
main/twoswirls/data/twoswirls.raw
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e8401828e1133e1ac2f633b43ba62edfa05298c8e9d001d375cccfea0e638331
|
| 3 |
+
size 3145728
|
main/twoswirls/data/twoswirls.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
64 64 64
|
| 2 |
+
vector
|
main/twoswirls/task_description.txt
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Load the Two Swirls vector field from "twoswirls/data/twoswirls.raw", the information about this dataset:
|
| 2 |
+
Two Swirls (Vector)
|
| 3 |
+
Data Scalar Type: float
|
| 4 |
+
Data Byte Order: Little Endian
|
| 5 |
+
Data Extent: 64x64x64
|
| 6 |
+
Number of Scalar Components: 3
|
| 7 |
+
Data loading is very important, make sure you correctly load the dataset according to their features.
|
| 8 |
+
|
| 9 |
+
Create four stream surfaces using "Stream Tracer" filters with "Line" seed type (resolution 25 points each), and apply a "Ribbon" filter (width 2.5) to each:
|
| 10 |
+
- Stream Surface 1: Line seed from [16, 10, 32] to [16, 54, 32]. Ribbon colored solid green (RGB: 0.2, 0.7, 0.3) with opacity 0.35.
|
| 11 |
+
- Stream Surface 2: Line seed from [20, 32, 10] to [20, 32, 54]. Ribbon with opacity 0.35.
|
| 12 |
+
- Stream Surface 3: Line seed from [48, 10, 32] to [48, 54, 32]. Ribbon colored solid blue (RGB: 0.2, 0.4, 0.85) with opacity 0.35.
|
| 13 |
+
- Stream Surface 4: Line seed from [44, 32, 10] to [44, 32, 54]. Ribbon with opacity 0.35.
|
| 14 |
+
|
| 15 |
+
Show the dataset bounding box as an outline (black, opacity 0.3).
|
| 16 |
+
|
| 17 |
+
In the pipeline browser panel, hide all stream tracers and only show the ribbon filters and the outline.
|
| 18 |
+
|
| 19 |
+
Use a white background (RGB: 1.0, 1.0, 1.0).
|
| 20 |
+
Save the paraview state as "twoswirls/results/{agent_mode}/twoswirls.pvsm".
|
| 21 |
+
Save the visualization image as "twoswirls/results/{agent_mode}/twoswirls.png".
|
| 22 |
+
(Optional, if use python script) Save the python script as "twoswirls/results/{agent_mode}/twoswirls.py".
|
| 23 |
+
Do not save any other files, and always save the visualization image.
|
main/twoswirls/visualization_goals.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
vision:
|
| 2 |
+
1. Swirl Separation: Are there two visually distinct swirl structures (one on the left and one on the right), matching the spatial arrangement in the ground truth?
|
| 3 |
+
2. Stream Surface Shape: Do the ribbon surfaces show wrapped, swirling sheet-like structures similar to the ground truth?
|
| 4 |
+
3. Color and Transparency: Are the stream surfaces rendered with distinct colors (green and blue) and semi-transparency, similar to the ground truth?
|
| 5 |
+
|