ae3dConvertToScreen 続き

立方体のワイアフレームを、4つのひと筆書きのポリゴンで作ると、線だけの透明な立方体では問題ないですが、 グラフィックをオペークにして、面に色を付けたりすると、右図1のように閉じられていないポイントに、 線が入ってしまいます。これを避けるには、立方体の6面を単位としたグループで、 ポリゴンを構成するのが良いようです。 図3のポイントリストで、立体の面に色を付ける on mouseUp repeat for each line theLine in field "tPoints" if theLine = "" then put return after output next repeat end if put ae3dconverttoscreen(theLine,the loc of this cd,300) & return after output end repeat set the points of graphic "threeD" to char 1 to -2 of output set the foregroundcolor of grc "threeD" to 179,179,179 set the backgroundcolor of grc "threeD" to 230,230,230 set the opaque of grc "threeD" to true end mouseUp しかし、とすると?  Z軸のプラスマイナスは逆向きかもしれない? と思ったけれど、 オペークの面が向こう側の線を、見えなくはしていないようで、 面に色を付けても、やはりすべての線が表示されます。




				
a 50,50,50
b 50,-50,50
g 50,-50,-50
e 50,50,-50
a 50,50,50

a 50,50,50
e 50,50,-50
f -50,50,-50
d -50,50,50
a 50,50,50

a 50,50,50
b 50,-50,50
c -50,-50,50
d -50,50,50
a 50,50,50

h -50,-50,-50
f -50,50,-50
e 50,50,-50
g 50,-50,-50
h -50,-50,-50

h -50,-50,-50
f -50,50,-50
d -50,50,50
c -50,-50,50
h -50,-50,-50

h -50,-50,-50
c -50,-50,50
b 50,-50,50
g 50,-50,-50
h -50,-50,-50