Re: 3d point and line graphs in PB
Posted: Fri Jul 20, 2018 3:29 pm
because the DK_PETER texture is designed as a square with color green and he put over it another smaller square with color black so in result the whole texture appears as having edges. and when combining a transparency we see it as lines only
the texture coordinates used by "MeshVertexTextureCoordinate(u, v) for every vertex and designed for the square, but it does not does display the Lines over the pyramid triangles with the current u,v texture coordinates but it display it on the Base since it is square.
note that the texture coordinates are going like this over a picture:
(0,0) ...... (1,0)
.
.
.
(0,1) ...... (1,1)
(in reverse of the usual Cartesian coordinates)
note that in the data the item Data.f 0.0,0.5,0.0 is for the pyramid apix
you can even make extremely thick lines by changing line
with
the data section from Front to bottom: (what is changed is only the u,v coordinates, it is one way, other approaches may be better)
the texture coordinates used by "MeshVertexTextureCoordinate(u, v) for every vertex and designed for the square, but it does not does display the Lines over the pyramid triangles with the current u,v texture coordinates but it display it on the Base since it is square.
note that the texture coordinates are going like this over a picture:
(0,0) ...... (1,0)
.
.
.
(0,1) ...... (1,1)
(in reverse of the usual Cartesian coordinates)
note that in the data the item Data.f 0.0,0.5,0.0 is for the pyramid apix
you can even make extremely thick lines by changing line
Code: Select all
RoundBox(24, 24, 976, 976, 10, 10, $0)
Code: Select all
RoundBox(100, 100, 800, 800, 10, 10, RGB(0,0,0))
Code: Select all
;-Front
Data.f 0.5,-0.5,0.5 ; position
Data.l $FFFFFF ; color
Data.f 0,0 ; UVCoordinate
Data.f 0.0,0.5,0.0
Data.l $FFFFFF
Data.f 0,1
Data.f -0.5,-0.5,0.5
Data.l $FFFFFF
Data.f 1,0
Data.w 0,1,2 ; Face
;-Back
Data.f -0.5,-0.5,-0.5
Data.l $FFFFFF
Data.f 0,0
Data.f 0.0,0.5,0.0
Data.l $FFFFFF
Data.f 0,1
Data.f 0.5,-0.5,-0.5
Data.l $FFFFFF
Data.f 1,0
Data.w 0,1,2
;-Left
Data.f -0.5,-0.5,0.5
Data.l $FFFFFF
Data.f 0,0
Data.f 0.0,0.5,0.0
Data.l $FFFFFF
Data.f 0,1
Data.f -0.5,-0.5,-0.5
Data.l $FFFFFF
Data.f 1,0
Data.w 0,1,2
;-Right
Data.f 0.5,-0.5,-0.5
Data.l $FFFFFF
Data.f 0,0
Data.f 0.0,0.5,0.0
Data.l $FFFFFF
Data.f 0,1
Data.f 0.5,-0.5,0.5
Data.l $FFFFFF
Data.f 1,0
Data.w 0,1,2