コード例 #1
0
def object_space_lens_close():
    position_near = (0.092, -0.056, 0.161)
    position_far = (0.100, -0.101, -0.073)
    position_middle = (0.093, -0.074, 0.064)

    g.set_duration(0.0)
    g.set_rendering_algorithm_settings({
        "use_screen_space_lens": False,
        "object_space_lens_radius": 0.0,
        "object_space_lens_position": position_middle,
        "focus_outline_width": 3.2
    })

    g.set_duration(2)
    g.set_rendering_algorithm_settings({"object_space_lens_radius": 0.075})
    g.set_duration(2)

    g.set_duration(2)
    g.set_rendering_algorithm_settings(
        {"object_space_lens_position": position_near})
    g.set_duration(2)
    g.set_rendering_algorithm_settings(
        {"object_space_lens_position": position_far})
    g.set_duration(2)
    g.set_rendering_algorithm_settings(
        {"object_space_lens_position": position_middle})
    g.set_duration(4)
コード例 #2
0
def init_scene():
    g.set_duration(0)
    g.set_dataset('Femur (Vis2021, Teaser)')
    g.set_camera_checkpoint('TeaserA-2')
    g.set_rendering_algorithm_settings({
        'line_width': 0.005,
        'band_width': 0.008,
        'depth_cue_strength': 0.8
    })
    g.set_dataset_settings({
        'attribute': "Principal Stress Magnitude",
        'major_on': True,
        'medium_on': False,
        'minor_on': True,
        'major_lod': 0.3,
        'minor_lod': 0.5,
        'major_use_bands': True,
        'minor_use_bands': False,
        'thick_bands': True,
        'smoothed_bands': True,
        'use_principal_stress_direction_index': True,
    })
    g.set_transfer_functions([
        'qualitative-pale-lilac.xml', 'qualitative-emerald.xml',
        'qualitative-ocher.xml'
    ])
    g.set_transfer_functions_ranges([(0.0, 1.594), (0.0, 1.594), (0.0, 1.594)])
    #g.set_transfer_functions_ranges([(-0.06, 1.274), (-0.213, 0.157), (-0.96, 0.019)])
    g.set_duration(0.001)
    g.set_transfer_functions_ranges([(0.0, 1.594), (0.03, 1.594),
                                     (0.0, 1.594)])
    g.set_duration(6)
コード例 #3
0
ファイル: lod2.py プロジェクト: chrismile/LineVis
def init_scene():
    g.set_duration(0)
    g.set_dataset('Arched Bridge 3D (TVCG01, Fig 6, Fig 9)')
    #g.set_dataset('KittenHex (Vis2021, results)')
    g.set_camera_checkpoint('Front')
    g.set_rendering_algorithm_settings({
        'line_width': 0.0022,
        'band_width': 0.004,
        'depth_cue_strength': 0.8
    })
    g.set_dataset_settings({
        'attribute': "Principal Stress",
        'major_on': True,
        'medium_on': False,
        'minor_on': True,
        'major_lod': 1.0,
        'medium_lod': 1.0,
        'minor_lod': 1.0,
        'major_use_bands': False,
        'medium_use_bands': False,
        'minor_use_bands': False,
        'thick_bands': True,
        'smoothed_bands': True,
        'use_principal_stress_direction_index': True,
    })
    g.set_transfer_functions([
        'qualitative-ocher.xml', 'qualitative-emerald.xml',
        'qualitative-pale-lilac.xml'
    ])
    g.set_duration(6)
コード例 #4
0
def init_scene():
    g.set_duration(0.0)
    g.set_renderer("ClearView (Unified)")
    g.set_mesh(
        "2011 - All-Hex Mesh Generation via Volumetric PolyCube Deformation",
        "anc101_a1", "mesh")
    g.set_transfer_function("Standard_anc_vid.xml")
    g.set_camera_checkpoint("Frontal")
    g.set_rendering_algorithm_settings({
        "line_width":
        0.0016,
        "lod_value_context":
        0.128,
        "lod_value_focus":
        0.15,
        "use_screen_space_lens":
        True,
        "screen_space_lens_radius":
        0.0,
        "screen_space_lens_position": (10.5, 10.5),
        "focus_outline_width":
        9.0,
        "clip_focus_outline":
        False,
        "focus_outline_color": (1.0, 0.0, 0.0),
        "important_lines":
        0.571,
        "important_cells":
        0.522,
    })
    g.set_duration(2)
コード例 #5
0
def init_scene():
    position_middle = (0.098, -0.074, 0.083)

    g.set_duration(0.0)
    g.set_camera_position(0.09029, -0.0507826, 0.187197)
    g.set_camera_yaw_pitch_rad(-1.62982, -0.165676)
    g.set_renderer("ClearView (Unified)")
    g.set_mesh("2016 - All-Hex Meshing Using Closed-Form Induced Polycube", "grayloc-hex", "vtk")
    g.set_transfer_function("Standard_grayloc.xml")
    g.set_duration(0.0)
    g.set_rendering_algorithm_settings({
        "line_width": 0.0016,
        "lod_value_context": 0.0,
        "lod_value_focus": 0.15,
        "use_screen_space_lens": False,
        "screen_space_lens_radius": 0.0,
        "screen_space_lens_position": (10.5, 10.5),
        "focus_outline_width": 3.2,
        "clip_focus_outline": False,
        "focus_outline_color": (1.0, 0.0, 0.0),
        "important_lines": 0.802,
        "important_cells": 0.562,
        "object_space_lens_radius": 0.068,
    })
    g.set_duration(0.0001)
    g.set_duration(0.0)
    g.set_rendering_algorithm_settings({
        "object_space_lens_position": position_middle
    })
    g.set_duration(1.0)
コード例 #6
0
def init_scene():
    g.set_duration(0.0)
    g.set_renderer("ClearView (Unified)")
    g.set_mesh("2016 - All-Hex Meshing Using Closed-Form Induced Polycube",
               "grayloc-hex", "vtk")
    g.set_transfer_function("Standard_grayloc.xml")
    g.set_camera_checkpoint("Overview")
    g.set_rendering_algorithm_settings({
        "line_width":
        0.0016,
        "lod_value_context":
        0.0,
        "lod_value_focus":
        0.15,
        "use_screen_space_lens":
        True,
        "screen_space_lens_radius":
        0.0,
        "screen_space_lens_position": (10.5, 10.5),
        "focus_outline_width":
        11.5,
        "clip_focus_outline":
        False,
        "focus_outline_color": (1.0, 0.0, 0.0),
        "important_lines":
        0.562,
        "important_cells":
        0.562,
    })
    g.set_duration(2)
コード例 #7
0
def init_scene():
    g.set_duration(0)
    g.set_dataset('Cantilever (Vis2021)')
    g.set_camera_checkpoint('Overview')
    g.set_rendering_algorithm_settings({
        'line_width': 0.007,
        'band_width': 0.005,
        'depth_cue_strength': 0.0
    })
    g.set_dataset_settings({
        'attribute': "Principal Stress",
        'major_on': True,
        'medium_on': False,
        'minor_on': True,
        'major_lod': 0.5,
        'minor_lod': 0.5,
        'major_use_bands': True,
        'minor_use_bands': False,
        'thick_bands': False,
        'smoothed_bands': True,
        'use_principal_stress_direction_index': True,
    })
    g.set_transfer_functions([
        'qualitative-pale-lilac.xml', 'qualitative-emerald.xml',
        'qualitative-ocher.xml'
    ])
コード例 #8
0
def init_scene():
    g.set_duration(0.0)
    g.set_renderer("ClearView (Unified)")
    g.set_mesh(
        "2015 - Practical Hex-Mesh Optimization via Edge-Cone Rectification",
        "dragon_out", "mesh")
    g.set_transfer_function("Standard_dragon.xml")
    g.set_camera_checkpoint("Overview")
    g.set_rendering_algorithm_settings({
        "line_width":
        0.0018,
        "lod_value_context":
        0.126,
        "lod_value_focus":
        0.192,
        "use_screen_space_lens":
        True,
        "screen_space_lens_radius":
        0.0,
        "screen_space_lens_position": (10.5, 10.5),
        "focus_outline_width":
        9.0,
        "clip_focus_outline":
        False,
        "focus_outline_color": (1.0, 0.0, 0.0),
        "important_lines":
        0.457,
        "important_cells":
        0.440,
    })
    g.set_duration(2)
コード例 #9
0
def init_scene():
    g.set_use_camera_flight(True)
    g.set_duration(0.0)
    g.set_renderer("ClearView (Unified)")
    g.set_mesh("2012 - All-Hex Meshing using Singularity-Restricted Field", "sculpture/sculpture-B", "vtk")
    g.set_transfer_function("Standard.xml")
    g.set_camera_checkpoint("Video")
    g.set_rendering_algorithm_settings({
        "line_width": 0.0040,
        "lod_value_context": 0.3,
        "lod_value_focus": 0.3,
        "use_screen_space_lens": True,
        "screen_space_lens_radius": 0.0,
        "screen_space_lens_position": (10.5, 10.5),
        "focus_outline_width": 9.0,
        "clip_focus_outline": False,
        "focus_outline_color": (1.0, 0.0, 0.0),
        "important_lines": 0.644,
        "important_cells": 0.446,
    })
コード例 #10
0
ファイル: ribbon.py プロジェクト: chrismile/LineVis
def init_scene():
    g.set_duration(0)
    g.set_dataset('Arched Bridge 3D (TVCG01, Fig 6, Fig 9)')
    g.set_camera_checkpoint('Closeup')
    g.set_rendering_algorithm_settings({
        'band_width': 0.003,
        'depth_cue_strength': 0.8
    })
    g.set_dataset_settings({
        'major_on': False,
        'medium_on': False,
        'minor_on': True,
        'minor_lod': 0.3,
        'minor_use_bands': True,
        'thick_bands': False,
        'smoothed_bands': True,
        'use_principal_stress_direction_index': True
    })
    g.set_transfer_functions([
        'qualitative-ocher.xml', 'qualitative-emerald.xml',
        'qualitative-pale-lilac.xml'
    ])
コード例 #11
0
def move_lens_overview():
    total_time = 10.0
    lens_positions = [(0.5076366666666666, -0.401389),
                      (0.25763666666666657, -0.579167),
                      (0.01597266666666681, -0.619444),
                      (-0.48402733333333336, -0.416667),
                      (-0.4423613333333334, 0.102778),
                      (-0.3368053333333333, 0.590278),
                      (-0.2673613333333334, 0.172222),
                      (0.40069666666666703, 0.155556),
                      (0.4923566666666665, -0.405556)]

    # Move lens to start position.
    g.set_duration(0)
    g.set_rendering_algorithm_settings(
        {"screen_space_lens_position": lens_positions[0]})
    g.set_duration(1.5)
    g.set_rendering_algorithm_settings({"screen_space_lens_radius": 360.0})
    g.set_duration(2)

    total_length = 0.0
    for i in range(1, len(lens_positions)):
        total_length += distance_vec2(lens_positions[i - 1], lens_positions[i])

    for i in range(1, len(lens_positions)):
        curr_distance = distance_vec2(lens_positions[i - 1], lens_positions[i])
        g.set_duration(curr_distance * total_time / total_length)
        g.set_rendering_algorithm_settings(
            {"screen_space_lens_position": lens_positions[i]})

    # Hide lens.
    g.set_duration(2)
    g.set_duration(1)
    g.set_rendering_algorithm_settings({"screen_space_lens_radius": 0.0})
    g.set_duration(0)
    g.set_rendering_algorithm_settings(
        {"screen_space_lens_position": (10.5, 10.5)})
    g.set_duration(2)
コード例 #12
0
def init_scene():
    g.set_duration(0.0)
    g.set_renderer("ClearView (Unified)")
    g.set_mesh(
        "2020 - LoopyCuts - Practical Feature-Preserving Block Decomposition for Strongly Hex-Dominant Meshing",
        "motor_tail", "mesh")
    g.set_transfer_function("motor_tail.xml")
    g.set_camera_checkpoint("Close")
    g.set_rendering_algorithm_settings({
        "line_width":
        0.0038,
        "modulate_line_thickness_by_depth":
        True,
        "lod_value_context":
        0.002,
        "lod_value_focus":
        0.251,
        "use_screen_space_lens":
        True,
        "screen_space_lens_radius":
        855.0,
        "screen_space_lens_position": (-0.00368189, -0.157585),
        "focus_outline_width":
        14.0,
        "clip_focus_outline":
        False,
        "focus_outline_color": (1.0, 0.0, 0.0),
        "important_lines":
        0.554,
        "important_cells":
        0.300,
        "use_num_cells_or_volume":
        0.522,
        "lod_merge_factor":
        0.0,
    })
    g.set_duration(1.0)
コード例 #13
0
def move_lens_overview():
    total_time = 30.0
    lens_positions = [(1.2423566666666666, -0.458333),
                      (-0.3131943333333333, -0.458333),
                      (-1.2020833333333334, -0.458333),
                      (-0.6854166333333335, 0.186111),
                      (-0.6451393333333333, 0.283333),
                      (-0.10208333333333333, 0.283333),
                      (0.21874966666666656, 0.283333),
                      (0.35624666666666654, 0.152778),
                      (0.5131966666666667, 0.1),
                      (1.2159766666666667, -0.470833)]

    # Move lens to start position.
    g.set_duration(0)
    g.set_rendering_algorithm_settings(
        {"screen_space_lens_position": lens_positions[0]})
    g.set_duration(2)
    g.set_rendering_algorithm_settings({"screen_space_lens_radius": 360.0})
    g.set_duration(2)

    total_length = 0.0
    for i in range(1, len(lens_positions)):
        total_length += distance_vec2(lens_positions[i - 1], lens_positions[i])

    for i in range(1, len(lens_positions)):
        curr_distance = distance_vec2(lens_positions[i - 1], lens_positions[i])
        g.set_duration(curr_distance * total_time / total_length)
        g.set_rendering_algorithm_settings(
            {"screen_space_lens_position": lens_positions[i]})

        if i == 1:
            g.set_duration(2)
        if i == 2:
            g.set_duration(0.5)
        if i == 3:
            g.set_duration(2)
        if i == 7:
            g.set_duration(2)

    g.set_duration(4)
コード例 #14
0
def change_important_lines_close():
    # Make lens grow.
    g.set_duration(0)
    g.set_rendering_algorithm_settings({
        "screen_space_lens_position": (0.167916, 0.0),
        "screen_space_lens_radius":
        0.0
    })
    g.set_duration(1)
    g.set_rendering_algorithm_settings({"screen_space_lens_radius": 560.0})
    g.set_duration(1)

    # Increase the number of shown lines and cells.
    g.set_duration(3)
    g.set_rendering_algorithm_settings({
        "important_lines": 0.783,
    })
    g.set_duration(1)
    g.set_duration(3)
    g.set_rendering_algorithm_settings({
        "important_cells": 0.783,
    })
    g.set_duration(1)
    g.set_duration(2)
    g.set_rendering_algorithm_settings({
        "important_cells": 0.562,
    })
    g.set_duration(1)
    g.set_duration(1)
    g.set_rendering_algorithm_settings({"screen_space_lens_radius": 0.0})
    g.set_duration(0)
    g.set_rendering_algorithm_settings(
        {"screen_space_lens_position": (10.5, 10.5)})
    g.set_duration(1)
コード例 #15
0
def move_lens_overview():
    lens_positions = [
        (0.12291666666666666, -0.615278),
        (0.12291666666666666, -0.615278),
        (0.12291666666666666, -0.615278),
        (0.25624666666666684, -0.615278),
        (0.22985666666666685, -0.615278),
        (0.25624666666666684, -0.615278),
        (0.28819666666666677, -0.598611),
        (0.3048566666666665, -0.586111),
        (0.3118066666666667, -0.577778),
        (0.3451366666666666, -0.565278),
        (0.4034766666666665, -0.568056),
        (0.422916666666667, -0.572222),
        (0.46319666666666703, -0.583333),
        (0.5173566666666665, -0.605556),
        (0.5423566666666668, -0.615278),
        (0.5423566666666668, -0.613889),
        (0.5423566666666668, -0.593056),
        (0.534026666666667, -0.573611),
        (0.5131966666666667, -0.431944),
        (0.5229166666666664, -0.204167),
        (0.5329166666666667, -0.00277776),
        (0.5429166666666668, 0.215278),
        (0.5379166666666666, 0.372222),
        (0.5329166666666667, 0.466667),
        (0.5179166666666665, 0.47),
        (0.5179166666666665, 0.47),
        (0.5179166666666665, 0.47),
        (0.4704166666666667, 0.47),
        (0.4470866666666666, 0.448611),
        (0.4118066666666664, 0.436111),
        (0.39652666666666664, 0.423611),
        (0.3937466666666666, 0.419444),
        (0.386806666666667, 0.409722),
        (0.28819666666666677, 0.351389),
        (0.0951386666666666, 0.273611),
        (-0.0756943333333333, 0.195833),
        (-0.12652733333333338, 0.138889),
        (-0.0673613333333334, 0.0833334),
        (0.041527666666666754, 0.0347222),
        (0.21208666666666684, 0.00833333),
        (0.40069666666666703, 0.00833333),
        (0.5520866666666667, 0.00972223),
        (0.6312466666666668, 0.00555551),
        (0.7184766666666668, 0),
        (0.792636666666667, 0),
        (0.807086666666667, 0.00416672),
        (0.8256966666666667, 0.0111111),
        (0.8270866666666664, 0.0111111),
        (0.8270866666666664, 0.0111111),
        (0.8256966666666667, 0.0125),
        (0.8229166666666666, 0.0138888),
        (0.8104166666666667, 0.0138888),
        (0.7159766666666665, -0.0388889),
        (0.6173566666666666, -0.0847222),
        (0.5534766666666668, -0.115278),
        (0.37569666666666673, -0.195833),
        (0.18402766666666664, -0.2875),
        (0.06736066666666653, -0.351389),
        (-0.010416333333333227, -0.4),
        (-0.04097233333333337, -0.433333),
        (-0.03680533333333326, -0.443056),
        (-0.014027333333333381, -0.472222),
        (0.03597266666666662, -0.474389),
        (0.0659726666666668, -0.476389)
    ]

    # Move lens to start position.
    g.set_duration(0)
    g.set_rendering_algorithm_settings({ "screen_space_lens_position": lens_positions[0] })
    g.set_rendering_algorithm_settings({ "screen_space_lens_radius": 360.0 })

    for i in range(1, len(lens_positions)):
        g.set_duration(0.5)
        g.set_rendering_algorithm_settings({ "screen_space_lens_position": lens_positions[i] })
コード例 #16
0
def elliptic_tubes_off_depth_cues_on():
    g.set_duration(0)
    g.set_rendering_algorithm_settings({'depth_cue_strength': 1.0})
    g.set_duration(6)
コード例 #17
0
def move_lens_overview():
    total_time = 42.0
    lens_positions = [(-1.0659723333333333, 0.505556),
                      (-0.9854163333333333, 0.508333),
                      (-0.9145833333333333, 0.513889),
                      (-0.8076388333333333, 0.519444),
                      (-0.7145833333333333, 0.533333),
                      (-0.6048613333333333, 0.529167),
                      (-0.5409723333333334, 0.538889),
                      (-0.49097233333333334, 0.543056),
                      (-0.41458333333333336, 0.540278),
                      (-0.36597233333333334, 0.531944),
                      (-0.3506943333333333, 0.534722),
                      (-0.3368053333333333, 0.488889),
                      (-0.32847233333333337, 0.433333),
                      (-0.3298613333333334, 0.388889),
                      (-0.34513933333333313, 0.343056),
                      (-0.36458333333333315, 0.302778),
                      (-0.3881943333333333, 0.244444),
                      (-0.42708333333333315, 0.177778),
                      (-0.45763933333333334, 0.0986111),
                      (-0.5062503333333332, 0.0430555),
                      (-0.5548613333333334, -0.0375),
                      (-0.6076393333333334, -0.120833),
                      (-0.6187503333333333, -0.183333),
                      (-0.6465273333333335, -0.305556),
                      (-0.6326393333333333, -0.368056),
                      (-0.6076393333333334, -0.438889),
                      (-0.6020833333333333, -0.5),
                      (-0.5909723333333333, -0.548611),
                      (-0.5493053333333333, -0.548611),
                      (-0.5034723333333332, -0.559722),
                      (-0.44930533333333345, -0.561111),
                      (-0.3923613333333334, -0.572222),
                      (-0.31875033333333314, -0.575),
                      (-0.24791633333333324, -0.565278),
                      (-0.19930533333333358, -0.468056),
                      (-0.1256943333333333, -0.398611),
                      (-0.07847233333333337, -0.301389),
                      (-0.025694333333333298, -0.173611),
                      (0.010416666666666666, -0.0555556),
                      (0.09930566666666671, 0.0597222),
                      (0.16458366666666677, 0.168056),
                      (0.22430666666666638, 0.241667),
                      (0.3326366666666669, 0.268056),
                      (0.44513666666666657, 0.276389),
                      (0.5090266666666666, 0.263889),
                      (0.5756966666666667, 0.231944),
                      (0.6131966666666664, 0.198611),
                      (0.6215266666666663, 0.165278),
                      (0.6187466666666669, 0.118056),
                      (0.6020866666666668, 0.0513889),
                      (0.5673566666666668, -0.0319445),
                      (0.5173566666666665, -0.108333),
                      (0.47569666666666677, -0.195833),
                      (0.46319666666666703, -0.258333),
                      (0.45902666666666664, -0.316667),
                      (0.46041666666666636, -0.375),
                      (0.46041666666666636, -0.445833),
                      (0.4409766666666665, -0.501389),
                      (0.4409766666666665, -0.569444),
                      (0.4659766666666665, -0.619444),
                      (0.5243066666666667, -0.633333),
                      (0.6201366666666666, -0.625),
                      (0.7201366666666666, -0.613889),
                      (0.846526666666667, -0.588889),
                      (0.9284766666666668, -0.472222),
                      (0.9409766666666665, -0.305556),
                      (0.9506966666666667, -0.1375),
                      (0.9506966666666667, -0.0125),
                      (0.9534766666666669, 0.0902778)]

    # Move lens to start position.
    g.set_duration(0)
    g.set_rendering_algorithm_settings(
        {"screen_space_lens_position": lens_positions[0]})
    g.set_duration(2)
    g.set_rendering_algorithm_settings({"screen_space_lens_radius": 360.0})
    g.set_duration(2)

    total_length = 0.0
    for i in range(1, len(lens_positions)):
        total_length += distance_vec2(lens_positions[i - 1], lens_positions[i])

    for i in range(1, len(lens_positions)):
        curr_distance = distance_vec2(lens_positions[i - 1], lens_positions[i])
        g.set_duration(curr_distance * total_time / total_length)
        g.set_rendering_algorithm_settings(
            {"screen_space_lens_position": lens_positions[i]})

    g.set_duration(4)