Hello
Try this code:
Import sidesign.minib3d
Graphics3D 800,600,32,0
camera=CreateCamera()
PositionEntity camera,0,0,-15
light=CreateLight()
RotateEntity light,90,0,0
cr=CreateBrush(255,0,0)
BrushBlend cr,3
centro=CreateSphere(4)
PaintMesh centro,cr
c=CreateCube()
PaintMesh c,cr
ScaleMesh c,.25,.25,.25
For y#=-5.0 To 5.0 Step 1.0
For x#=-5.0 To 5.0 Step 1.0
For z#=-5.0 To 5.0 Step 1.0
PositionMesh c,x#,y#,z#
AddMesh c,centro
PositionMesh c,-x#,-y#,-z#
Next
Next
Next
FreeEntity c
While Not KeyDown(KEY_ESCAPE)
TurnEntity centro,.3,-.2,.1
RenderWorld
Flip
Wend
End
And now Try this other one:
Import sidesign.minib3d
Graphics3D 800,600,32,0
camera=CreateCamera()
PositionEntity camera,0,0,-15
light=CreateLight()
RotateEntity light,90,0,0
cr=CreateBrush(255,0,0)
BrushBlend cr,3
centro=CreateSphere(4)
PaintMesh centro,cr
c=CreateSphere()
PaintMesh c,cr
ScaleMesh c,.25,.25,.25
For y#=-5.0 To 5.0 Step 1.0
For x#=-5.0 To 5.0 Step 1.0
For z#=-5.0 To 5.0 Step 1.0
PositionMesh c,x#,y#,z#
AddMesh c,centro
PositionMesh c,-x#,-y#,-z#
Next
Next
Next
FreeEntity c
While Not KeyDown(KEY_ESCAPE)
TurnEntity centro,.3,-.2,.1
RenderWorld
Flip
Wend
End
The first code work well. One array of cubes turn on the screen.
But, in the second code the array of spheres is broken.
I believe that the vertices of mesh don't move well.
Somebody knows what happens?
Greetings.
Try this code:
Import sidesign.minib3d
Graphics3D 800,600,32,0
camera=CreateCamera()
PositionEntity camera,0,0,-15
light=CreateLight()
RotateEntity light,90,0,0
cr=CreateBrush(255,0,0)
BrushBlend cr,3
centro=CreateSphere(4)
PaintMesh centro,cr
c=CreateCube()
PaintMesh c,cr
ScaleMesh c,.25,.25,.25
For y#=-5.0 To 5.0 Step 1.0
For x#=-5.0 To 5.0 Step 1.0
For z#=-5.0 To 5.0 Step 1.0
PositionMesh c,x#,y#,z#
AddMesh c,centro
PositionMesh c,-x#,-y#,-z#
Next
Next
Next
FreeEntity c
While Not KeyDown(KEY_ESCAPE)
TurnEntity centro,.3,-.2,.1
RenderWorld
Flip
Wend
End
And now Try this other one:
Import sidesign.minib3d
Graphics3D 800,600,32,0
camera=CreateCamera()
PositionEntity camera,0,0,-15
light=CreateLight()
RotateEntity light,90,0,0
cr=CreateBrush(255,0,0)
BrushBlend cr,3
centro=CreateSphere(4)
PaintMesh centro,cr
c=CreateSphere()
PaintMesh c,cr
ScaleMesh c,.25,.25,.25
For y#=-5.0 To 5.0 Step 1.0
For x#=-5.0 To 5.0 Step 1.0
For z#=-5.0 To 5.0 Step 1.0
PositionMesh c,x#,y#,z#
AddMesh c,centro
PositionMesh c,-x#,-y#,-z#
Next
Next
Next
FreeEntity c
While Not KeyDown(KEY_ESCAPE)
TurnEntity centro,.3,-.2,.1
RenderWorld
Flip
Wend
End
The first code work well. One array of cubes turn on the screen.
But, in the second code the array of spheres is broken.
I believe that the vertices of mesh don't move well.
Somebody knows what happens?
Greetings.