Shapes
flat.shapes
Module for drawing shape using Compiled Graphics Objects (CGO).
- flat.shapes.cone(center=(0, 0, 0), normal=(0, 0, 1), radius=0.5, height=1.0, color='', *, quiet=1, _self=cmd)
- DESCRIPTION
Return a CGO cone object.
- USAGE
cone [ center [, normal [, radius, [, height [, color ]]]]]
- ARGUMENTS
- centerfloat3, default = (0, 0, 0)
Shape position in Angstroms.
- normalfloat3, default = (0, 0, 1)
Orientation of shape (normal vector).
- radiusfloat, default = 0.5
Shape radius in Angstroms.
- heightfloat, default = 1.0
Shape height in Angstroms.
- colorstr, optional
Shape color.
- RETURNS
- : List
Coordinate data for the CGO.
- REFERENCE
- flat.shapes.cube(center=(0, 0, 0), normal=(0, 0, 1), rotation=0, length=(1, 1, 1), color='', *, quiet=1, _self=cmd)
- DESCRIPTION
Return a CGO rectangular cuboid object.
- USAGE
cube [ center [, normal [, rotation, [, length [, color ]]]]]
- ARGUMENTS
- centerfloat3, default = (0, 0, 0)
Shape position in Angstroms.
- normalfloat3, default = (0, 0, 1)
Orientation of shape (normal vector).
- rotationfloat, default = 0
Rotation around normal in radians.
- lengthfloat3, default = (0, 0, 0)
Dimensions of the shape in Angstroms.
- colorstr, optional
Shape color.
- RETURNS
- : List
Coordinate data for the CGO.
- REFERENCE
- flat.shapes.cylinder(center=(0, 0, 0), normal=(0, 0, 1), radius=0.5, height=1.0, color='', *, quiet=1, _self=cmd)
- DESCRIPTION
Return a CGO cylinder object.
- USAGE
cylinder [ center [, normal [, radius, [, height [, color ]]]]]
- ARGUMENTS
- centerfloat3, default = (0, 0, 0)
Shape position in Angstroms.
- normalfloat3, default = (0, 0, 1)
Orientation of shape (normal vector).
- radiusfloat, default = 0.5
Shape radius in Angstroms.
- heightfloat, default = 1.0
Shape height in Angstroms.
- colorstr, optional
Shape color.
- RETURNS
- : List
Coordinate data for the CGO.
- REFERENCE
- flat.shapes.octahedron(center=(0, 0, 0), normal=(0, 0, 1), rotation=0, length=1.0, color='', *, quiet=1, _self=cmd)
- DESCRIPTION
Return a CGO octahedron object.
- USAGE
octahedron [ center [, normal [, rotation, [, length [, color ]]]]]
- ARGUMENTS
- centerfloat3, default = (0, 0, 0)
Shape position in Angstroms.
- normalfloat3, default = (0, 0, 1)
Orientation of shape (normal vector).
- rotationfloat, default = 0
Rotation around normal in radians.
- lengthfloat, default = 1.0
Shape side length in Angstroms.
- colorstr, optional
Shape color.
- RETURNS
- : List
Coordinate data for the CGO.
- flat.shapes.polygon(center=(0, 0, 0), normal=(0, 0, 1), rotation=0, radius=0.5, sides=3, color='', *, quiet=1, _self=cmd)
- DESCRIPTION
Return a CGO n-sided polygon object.
- USAGE
polygon [ center [, normal [, radius, [, height [, color ]]]]]
- ARGUMENTS
- centerfloat3, default = (0, 0, 0)
Shape position in Angstroms.
- normalfloat3, default = (0, 0, 1)
Orientation of shape (normal vector).
- rotationfloat, default = 0
Rotation around normal in radians.
- radiusfloat, default = 0.5
Shape radius in Angstroms.
- sidesint, default = 3
Number of polygon sides.
- colorstr, optional
Shape color.
- RETURNS
- : List
Coordinate data for the CGO.
- flat.shapes.prism(center=(0, 0, 0), normal=(0, 0, 1), rotation=0, radius=0.5, height=1.0, sides=3, color='', *, quiet=1, _self=cmd)
- DESCRIPTION
Return a CGO n-sided prism object.
- USAGE
prism [ center [, normal [, rotation [, radius [, height [, sides [, color ]]]]]]]
- ARGUMENTS
- centerfloat3, default = (0, 0, 0)
Shape position in Angstroms.
- normalfloat3, default = (0, 0, 1)
Orientation of shape (normal vector).
- rotationfloat, default = 0
Rotation around normal in radians.
- radiusfloat, default = 0.5
Shape radius in Angstroms.
- heightfloat, default = 1.0
Shape height in Angstroms.
- sidesint, default = 3
Number of polygon sides.
- colorstr, optional
Shape color.
- RETURNS
- : List
Coordinate data for the CGO.
- REFERENCE
- flat.shapes.pyramid(center=(0, 0, 0), normal=(0, 0, 1), rotation=0, radius=0.5, height=1.0, sides=3, color='', *, quiet=1, _self=cmd)
- DESCRIPTION
Return a CGO n-sided pyramid object.
- USAGE
pyramid [ center [, normal [, rotation, [, radius [, height [, sides [, color ]]]]]]]
- ARGUMENTS
- centerfloat3, default = (0, 0, 0)
Shape position in Angstroms.
- normalfloat3, default = (0, 0, 1)
Orientation of shape (normal vector).
- rotationfloat, default = 0
Rotation around normal in radians.
- radiusfloat, default = 0.5
Shape radius in Angstroms.
- heightfloat, default = 1.0
Shape height in Angstroms.
- sidesint, default = 3
Number of polygon sides.
- colorstr, optional
Shape color.
- RETURNS
- : List
Coordinate data for the CGO.
- REFERENCE
- flat.shapes.sphere(center=(0, 0, 0), normal=(0, 0, 1), radius=0.5, color='', *, quiet=1, _self=cmd)
- DESCRIPTION
Return a CGO sphere object.
- USAGE
sphere [ center [, normal [, radius, [, color ]]]]
- ARGUMENTS
- centerfloat3, default = (0, 0, 0)
Shape position in Angstroms.
- normalfloat3, default = (0, 0, 1)
Orientation of shape (normal vector).
- radiusfloat, default = 0.5
Shape radius in Angstroms.
- colorstr, optional
Shape color.
- RETURNS
- : List
Coordinate data for the CGO.
- REFERENCE
- flat.shapes.star(center=(0, 0, 0), normal=(0, 0, 1), rotation=0, sides=5, radius=1.0, cradius=0.5, height=1, color='', *, quiet=1, _self=cmd)
- DESCRIPTION
Return a CGO star prism object.
- USAGE
star [ center [, normal [, rotation, [, sides [, radius, [ height [, color ]]]]]]]
- ARGUMENTS
- centerfloat3, default = (0, 0, 0)
Shape position in Angstroms.
- normalfloat3, default = (0, 0, 1)
Orientation of shape (normal vector).
- rotationfloat, default = 0
Rotation around normal in radians.
- sidesint, default = 5
Number of star arms.
- radiusfloat, default = 1.0
Shape radius in Angstroms.
- cradiusfloat, default = 0.5
Shape inner-radius in Angstroms.
- heightfloat, default = 1.0
Shape height in Angstroms.
- colorstr, optional
Shape color.
- RETURNS
- : List
Coordinate data for the CGO.
- flat.shapes.torus(center=(0, 0, 0), normal=(0, 0, 1), radius=0.5, cradius=0.25, color='', samples=20, *, quiet=1, _self=cmd)
- DESCRIPTION
Return a CGO torus object.
- USAGE
torus [ center [, normal [, radius [, cradius [, color [, samples ]]]]]]
- ARGUMENTS
- centerfloat3, default = (0, 0, 0)
Shape position in Angstroms.
- normalfloat3, default = (0, 0, 1)
Orientation of shape (normal vector).
- radiusfloat, default = 0.5
Shape radius in Angstroms.
- cradiusfloat, default = 0.25
Shape inner radius in Angstroms.
- colorstr, optional
Shape color.
- samples, int, default = 20
Number of polygons sub-samples for the shape. More samples means less ‘blocky’ shape.
- RETURNS
- : List
Coordinate data for the CGO.
- REFERENCE
cgobuilder, Copyright (c) Schrodinger, LLC