Esempio n. 1
0
def xdraw_labels(labels):
    """ Draw pointcloud text labels.

    Parameters:
        labels (dic): {'pos':, 'name':, 'layer':}.

    Returns:
        list: Created label objects (bmeshes).
    """
    objects = xdraw_pointcloud(points=labels)
    set_objects_show_name(objects=objects, show=True)
    return objects
Esempio n. 2
0
def xdraw_labels(labels):
    """ Draw a set of text labels.

    Parameters:
        labels (dic): {'pos':, 'name':, 'layer':}.

    Returns:
        list: Created labels objects (bmeshes).
    """
    objects = xdraw_pointcloud(labels)
    set_objects_show_name(objects, show=True)
    deselect_all_objects()
    return objects
Esempio n. 3
0
n = 8

# Planets

spheres = []
for c, name in enumerate(planets_name):
    location = planets_distance[c] / giga
    spheres.append({
        'name': name,
        'radius': scale,
        'pos': [0, location, 0],
        'color': planets_color[c]
    })
planets = xdraw_spheres(spheres)
set_objects_show_name(objects=planets)

# Sun

sun_radius = 695700 * kilo
sun_mass = 1.989 * 10**30
sun = xdraw_spheres([{
    'name': 'sun',
    'pos': [0, 0, 0],
    'radius': scale,
    'color': [1, 1, 1]
}])
set_objects_show_name(objects=sun)

# Initial conditions