Post Reply 
Drawing a Spherical Mesh
01-23-2014, 10:11 PM
Post: #7
RE: Drawing a Spherical Mesh
Put this instead of your TRIANGLE command
Code:
    LINE(aa(1),aa(2),bb(1),bb(2),rgb(128+aa(1)*128,128+aa(2)*128,128+aa(3)*128)​);
    LINE(bb(1),bb(2),cc(1),cc(2),rgb(128+bb(1)*128,128+bb(2)*128,128+bb(3)*128)​);
    LINE(cc(1),cc(2),aa(1),aa(2),rgb(128+cc(1)*128,128+cc(2)*128,128+cc(3)*128)​);
Note that the LINE command compute a color depending on coordinates.
I did it because the TRIANCLE make a flat convex thing on screen.
MY changed TRIANGLE
Code:
triangle ({aa(1),aa(2),rgb(128+aa(1)*128,128+aa(2)*128,128+aa(3)*128),aa(3)},{bb(1),​bb(2),rgb(128+bb(1)*128,128+bb(2)*128,128+bb(3)*128),bb(3)},{cc(1),cc(2),rgb(128​+cc(1)*128,128+cc(2)*128,128+cc(3)*128),cc(3)});

Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Drawing a Spherical Mesh - jgreenb2 - 01-20-2014, 08:07 PM
RE: Drawing a Spherical Mesh - Han - 01-20-2014, 09:47 PM
RE: Drawing a Spherical Mesh - jgreenb2 - 01-20-2014, 09:58 PM
RE: Drawing a Spherical Mesh - jgreenb2 - 01-21-2014, 12:15 AM
RE: Drawing a Spherical Mesh - patrice - 01-21-2014, 01:08 AM
RE: Drawing a Spherical Mesh - patrice - 01-23-2014 10:11 PM



User(s) browsing this thread: 1 Guest(s)