User Manual: Basic Vector Shape Components
Common Properties Of Basic Shapes
There are 4 basic shape types: Circle, Rectangle, Polygon and Polyline. Every basic shape has a group of physics properties and a group of appearance properites.
The physics properties include:
- Enable Physics: enable physics or not. If this property is false, then the following other physics properties are meaningless.
- Static: static or moveable.
- Bullet: apply continuous collision detection (CCD) or not. Enabling bullet for a shape will make it hard to be passed through by other shapes. A static shape is always bullet enabled.
- Allow Sleeping: allow sleeping or not. If the property is true, the physics engine will not update the shape after sometime since its speed becomes zero. This will make the physics engine less CPU consuming. But when another shape contacts it, it will be waked up.
- Sensor: is a sensor shape or not. when another shape contacts a sensor shape, the contact events will still be reported, but there is no collisions occurred between them.
- Hollow: build physics for the interior of a shape or not.
- Build Border: build physics for the border of a shape or not.
- Fix Rotation: fix the rotation (relative to the world) or not.
- Collision Category: the collision category of the shape. See Collision Management for more.
- Linear Velocity Magnitude: the initial linear velocity magnitude (m/s).
- Linear Velocity Angle: the initial linear velocity direction (degrees).
- Angular Velocity: the initial angular velocity (degrees/s).
- Density: the density of the shape. To make the simulation stable, the best value range is from 1.0 to 200.0.
- Friction: the surface friction of the shape. Its valid value range is between 0.0 and 1.0. The larger the value, the more kinetic energy loss when the shape is slipping on the surfaces of other shapes.
- Restitution: the restitution of the shape. The valid value range is from 0.0 to 1.0. The larger the value, the more kinetic energy loss when the shape collides with other shapes. Value 0.0 means perfectly inelastic collision. Value 1.0 means perfect elastic collision. Please see Elastic and Inelastic Collisions at wikipedia and | wikipedia. You can assign a value larger than 1.0, but it is not realistic (if the simulation is for a system without energy input).
For circles, rectangles and polygons, the common appearance properties are listed blow:
- Is C.I. Shape: is a predefined C.I. shape or not. There are 6 C.I. shape types, see C.I. Shape Types for more info. If a shape is a predefined C.I. shape type, then most of its other appearance properties are not configurable.
- Filled: fill the interior or not.
- Opacity: the opacity of the interior. The value range is form 0 to 100.
- Filled Color: the color of the interior.
- Show Border: show border or not.
- Border Color: the color of the border.
- Border Thickness: The thickness of the border. The value are pixels.
- Border Opacity" the opacity of the border. The value range is form 0 to 100.
For Polyline, the appearance properties are listed at the Polyline section.
Basic Shape Types
There is one more appearance property:
- Appearance Type:
- Ball: make the circle look like a ball.
- Column: make the circle look like a column.
- Circle: do nothing extra.
A circle has one more basic property:
- Radius: the radius of the circle.
There is one more appearance property:
- Round Corners: if the corners are round or not. The round radius equals the half border thickness.
A rectangle has two more basic properties:
- Width: the width of the rectangle.
- Height: the height of the rectangle.
Currently, C.I. editor only supports convex polygons and non-self-intersected concave polygons to build physics. A self-intersected concave polygon can be physics enabled but its interior physics can't be built.
Different with other basic shapes, a polyline has its own appearance properties:
- Opacity: the opacity of the polyline. The value range is from 0 to 100.
- Color: the color of the polyline.
- Thickness: the thickness of the polyline.
- Round Ends: if the 2 ends of the polyline are round or not.
Create Basic Shape Entities
At the top of general component create command panel is the create shape commands.
The above 4 commands are used to create Basic Shape Components. Now, there are 4 general shape component types: Rectangle, Circle, Polygon and Polyline.
- To create a rectangle component, select the Create Rectangle Command (the above ), move mouse into the working area, then press the left mouse button and drag, when the size of the rectangle is satisfying, release left mouse button.
- Creating a circle component is much like creating a rectangle component, the difference is you must select the Create Circle Command (the above ) firstly.
- To create a polygon component, select the Create Polygon Command (the above ), move mouse into the working area, then click (press then release) mouse at the position of the first vertex of the polygon, then move mouse to the position of the second vertex and click, then the third vertex, .... To finish the creation process, you can click on either the first vertex or the last vertex.
- Creating a polyline component is much like creating a polygon component, the difference is you must select the Create Polyline Command (the above ) firstly.
- The minimal width and height of a rectangle is 2 pxiels.
- The minimal radius of a circle is 1 pixles, or the minimal diameter is 2 pixles.
- A polygon must have 3 vertexes at least.
- A polyline must have 2 vertexes at least.
- In any creating process, you can press ESC to cancel the process.