Пример #1
0
def output_frames_sample():
    # output sampling point
    pset=ParticleSettings()
    pset.set_camera(image_size=(640, 640))
    pvis=ParticleVisualizer([DATA_FILE],
        image_file_dir = 'images', settings=pset)
    
    # view mode: snapshot
    pvis.output_frames_as(0)
Пример #2
0
def output_frames_focused_sample():
    # Focused Snapshot
    pset = ParticleSettings({'camera_view_angle':5})
    pset.set_camera(image_size=(640, 640), file_name_format='case_focuse_%04d.png')
    
    pvis = ParticleVisualizer([DATA_FILE],
        image_file_dir = 'images', settings=pset)
    
    # view mode: snapshot
    pvis.output_frames_as(0)
Пример #3
0
def output_frames_sample():
    # output sampling point
    pset = ParticleSettings()
    pset.set_camera(image_size=(640, 640))
    pvis = ParticleVisualizer([DATA_FILE],
                              image_file_dir='images',
                              settings=pset)

    # view mode: snapshot
    pvis.output_frames_as(0)
Пример #4
0
def output_frames_focused_sample():
    # Focused Snapshot
    pset = ParticleSettings({'camera_view_angle': 5})
    pset.set_camera(image_size=(640, 640),
                    file_name_format='case_focuse_%04d.png')

    pvis = ParticleVisualizer([DATA_FILE],
                              image_file_dir='images',
                              settings=pset)

    # view mode: snapshot
    pvis.output_frames_as(0)
Пример #5
0
def output_frames_custom_sample():
    # Custom Particle Snapshot
    pset=ParticleSettings()
    pset.set_camera(image_size=(640, 640), file_name_format='case2_%04d.png')
    pset.add_plane_surface (origin = (0.0, 0.0, 0.0),
                                axis1 = (1.0, 0.0, 0.0),
                                axis2 = (0.0, 0.0, 1.0),
                                color = RGB_LIGHT_GREEN)
    
    pvis = ParticleVisualizer([DATA_FILE], 
        image_file_dir = 'images', settings=pset)
    
    # view mode: snapshot
    pvis.output_frames_as(0)
Пример #6
0
def output_frame_filtered_sample():
    # Filtered Particle Snapshot
    pset = ParticleSettings({'camera_view_angle': 5})
    pset.set_camera(image_size=(640, 640),
                    file_name_format='case_filter_%04d.png')

    pset.pfilter_func = user_pfilter_func
    pset.pfilter_sid_map_func = user_pfilter_sid_map_func
    pset.domain_attrs[SINGLE]['color'] = RGB_BLUE

    vs = ParticleVisualizer(glob.glob(DATA_FILES),
                            image_file_dir='images',
                            settings=pset)

    # view mode: snapshot
    vs.output_frames_as(0)
Пример #7
0
def output_frame_filtered_sample():
    # Filtered Particle Snapshot
    pset = ParticleSettings({'camera_view_angle':5})
    pset.set_camera(image_size=(640, 640), file_name_format='case_filter_%04d.png')
    
    pset.pfilter_func = user_pfilter_func
    pset.pfilter_sid_map_func = user_pfilter_sid_map_func
    pset.domain_attrs[SINGLE]['color'] = RGB_BLUE
    
    vs = ParticleVisualizer(glob.glob(DATA_FILES),
        image_file_dir = 'images', settings=pset)
    
    # view mode: snapshot
    vs.output_frames_as(0)
Пример #8
0
def output_frames_custom_sample():
    # Custom Particle Snapshot
    pset = ParticleSettings()
    pset.set_camera(image_size=(640, 640), file_name_format='case2_%04d.png')
    pset.add_plane_surface(origin=(0.0, 0.0, 0.0),
                           axis1=(1.0, 0.0, 0.0),
                           axis2=(0.0, 0.0, 1.0),
                           color=RGB_LIGHT_GREEN)

    pvis = ParticleVisualizer([DATA_FILE],
                              image_file_dir='images',
                              settings=pset)

    # view mode: snapshot
    pvis.output_frames_as(0)