MAKE OBJECT TRIANGLE This command will construct a 3D object from values that describe a single triangle mesh.
Syntax
    MAKE OBJECT TRIANGLE Object Number, X1, Y1, Z1, X2, Y2, Z2, X3, Y3, Z3
Parameters
    Object Number
Integer The object number
    X1
Float The first 3d point position x
    Y1
Float The first 3d point position y
    Z1
Float The first 3d point position z
    X2
Float The second 3d point position x
    Y2
Float The second 3d point position y
    Z2
Float The second 3d point position z
    X3
Float The third 3d point position x
    Y3
Float The third 3d point position x
    Z3
Float The third 3d point position x
Returns
This command does not return a value.
Description
The mesh is used as the root limb for the 3D object. The 3D object will be constructed untextured and such models will appear white when displayed. The object number should be specified using an integer value and the 3D coordinates specified using real values.
Example Code
    sync on

    sync rate 120

    hide mouse

    cls 0

    ObjectNumber=1

    make object sphere ObjectNumber,10

    color object ObjectNumber,rgb(0,0,255)

    while mouseclick()=0

    set cursor 0,0

    if scancode()>1 and scancode()<8 then if object exist(ObjectNumber)=1 then delete object ObjectNumber

    if inkey$()="1" then make object cube ObjectNumber,10:color object ObjectNumber,rgb(0,0,255)

    if inkey$()="2" then make object box ObjectNumber,10,10,20:color object ObjectNumber,rgb(0,0,255)

    if inkey$()="3" then make object cylinder ObjectNumber,10:color object ObjectNumber,rgb(0,0,255)

    if inkey$()="4" then make object cone ObjectNumber,10:color object ObjectNumber,rgb(0,0,255)

    if inkey$()="5" then make object plain ObjectNumber,10,10:color object ObjectNumber,rgb(0,0,255)

    if inkey$()="6" then make object triangle ObjectNumber, 0, 0, 0, 5, 5, 0, 0, 5, 0:color object ObjectNumber,rgb(0,0,255)

    xrotate object ObjectNumber,wrapvalue(object angle x(ObjectNumber)+1)

    yrotate object ObjectNumber,wrapvalue(object angle y(ObjectNumber)+1)

    sync

    endwhile

    delete object ObjectNumber

    end
See also
BASIC3D Commands Menu Index