2022-06-15 01:06 PM - last edited on 2022-06-17 03:44 PM by Laszlo Nagy
I am confused...
1. same color for a single shape is shown differently.
2. inner 3D view in gdl (during scripting, testing) and general 3D view in project doesn't match.
Originally I wanted to define some materials, so despite AC language version or template, objects would look the same. Maybe there's another approach?
pen 1
_si=15
define material 'purpleUniqName' 2, 1, 0, 1
define material 'whiteUniqName' 1,
1, 1, 1,! surface RGB [0.0..1.0]
1, ! ambient coefficient [0.0..1.0]
1, ! diffuse coefficient [0.0..1.0]
1, ! specular coeff. [0.0..1.0]
0, ! transparent coeff. [0.0..1.0]
0, ! shining [0.0..100.0]
0 ! transparency atten. [0.0..4.0]
matWhite = IND (MATERIAL, 'whiteUniqName')
matPurple = IND (MATERIAL, 'purpleUniqName')
! material 'purpleUniqName'
! block 1,1,1 ! purple cube OK
add 2,2, 0
REVOLVE{2} 2, 0, 360, 4 + 8 + 256, matWhite, ! NOT OK -> receive purple colour from ABOVE !? if comment those 2 rows
0, 0.5, 0, matWhite, ! if matWhite=18 (instead of inline definition)
2, 0.5, 0, matWhite
add 2, 2, 0
cprism_{3} matPurple, matPurple, matPurple, 0, ! SHOULD be purple prism, though it has white sides
5, 2,
0, 0, 0, _si, matPurple,
0, 1, 0, _si, matPurple,
1, 1, 0, _si, matPurple,
1, 0, 0, _si, matPurple,
0, 0, 0, -1, matPurple
add 2, 2, 0
cprism_{3} matWhite, matWhite, matWhite, 0, ! SHOULD be white cube with yellow top&bottom
5, 2,
0, 0, 0, _si, matWhite,
0, 1, 0, _si, matWhite,
1, 1, 0, _si, matWhite,
1, 0, 0, _si, matWhite,
0, 0, 0, -1, matWhite
! add 2,2, 0
! material 'whiteUniqName'
! block 1,1,1 ! white cube OK
Solved! Go to Solution.
2022-06-16 04:14 PM - last edited on 2022-06-17 03:43 PM by Laszlo Nagy
2022-06-16 04:14 PM - last edited on 2022-06-17 03:43 PM by Laszlo Nagy
Should have used Cprism{4} and revolve{5} instead