Get started — Shape4D 0.08 documentation

# Get started

## Importing the package of Shape4D

    >>> from Shape4D import *

Note

VisualShapes is the kernel of Shape4D.

By using VisualShapes, we can create all shapes in a visible way, but without much knowledge of plotting tools in Python, such as matplotlib. As a demo, the following is drawing the logo of Shape4D.

    import Shape4D.VisualShapes as vs
    W,H = 2.0,1.5
    shape = vs.Shape('rectangle',W,H)
    shape = shape.move(to = (2,0,0), by = (45,30))

    line = vs.Polyline((0,0,0),(3,1.,2))
    P = shape.intercept(line)
    line.broken_by(P)

    shape.plot(hideAxes=True,style = {'facecolor':'cornflowerblue', 'edgecolor':'navy'})
    shape.add_plot(line,style={'color':'k','linewidth':2,'node':'visible'})
    shape.show(azim=-20, elev=3)