Ok, I could not to find it , but I had few hours on weekend to do it. This is about similar, that I was looking , everything made in Blitz3d and animated
; Creating Robot
Graphics3D 800,600
SetBuffer BackBuffer()
camera=CreateCamera()
PositionEntity camera,0,0,-25
light=CreateLight()
RotateEntity light,90,0,0
;Create base for robot
base=CreateCube()
PositionEntity base,0,-0.8,0
EntityColor base,255,255,0 ; base color yellow
pivot=CreatePivot() ; Create pivot. This is invisible.
joint=CreateCylinder(16,True,pivot) ; Create joint. Make the pivot the parent of the joint.
TurnEntity joint,90,0,0
ScaleEntity joint,0.8,0.7,0.8
EntityColor joint,255,0,255 ; color red
cylinder=CreateCylinder(16,joint) ;Create first arm. Make the joint the parent of the arm (cylinder).
PositionEntity cylinder,0,2,0
ScaleEntity cylinder,0.7,2,0.7
EntityColor cylinder,255,255,0 ; color yellow
pivot1=CreatePivot() ; Create pivot1.
PositionEntity pivot1,0,4,0
joint1=CreateCylinder(16,True,pivot1) ; Create joint1. Make the pivot1 the parent of the joint1.
TurnEntity joint1,90,0,0
ScaleEntity joint1,0.65,0.7,0.65
EntityColor joint1,255,0,255 ; color red
cylinder1=CreateCylinder(16,joint1) ;Create second arm. Make the joint1 the parent of the arm (cylinder1).
PositionEntity cylinder1,0,6,0
ScaleEntity cylinder1,0.6,2,0.6
EntityColor cylinder1,255,255,0 ; color yellow
pivot2=CreatePivot() ; Create pivot2.
PositionEntity pivot2,0,8,0
joint2=CreateCylinder(16,True,pivot2) ; Create joint2 (i.e. a cylinder). Make the pivot2 the parent of the joint2.
TurnEntity joint2,90,0,0
ScaleEntity joint2,0.6,0.6,0.6
EntityColor joint2,255,0,255 ; color red
cylinder2=CreateCylinder(16,joint2) ;Create third arm. Make the joint2 the parent of the arm (cylinder2).
PositionEntity cylinder2,0,10,0
ScaleEntity cylinder2,0.5,2,0.5
EntityColor cylinder2,255,255,0 ; color yellow
pivot3=CreatePivot() ; Create pivot3.
PositionEntity pivot3,0,12,0
joint3=CreateSphere(16,pivot3) ; Create joint3. Make the pivot3 the parent of the joint3
ScaleEntity joint3,0.6,0.6,0.6
EntityColor joint3,50,200,200 ; color red
welder3=CreateCone(16,joint3) ;Create welder tip. Make the joint3 the parent of welder tip (welder3).
PositionEntity welder3,0,13,0
ScaleEntity welder3,0.4,1.2,0.4
EntityColor welder3,155,155,155 ; color yellow
;parenting pivots
EntityParent pivot1,pivot
EntityParent pivot2,pivot1
EntityParent pivot3,pivot2
;parenting entities
EntityParent cylinder,joint
EntityParent cylinder1,joint1
EntityParent cylinder2,joint2
EntityParent welder3,joint3
s=1
While Not KeyDown(1)
;A small rutine to get the robot alive
b=b+1 ;degr. that whole asssembly rotates arround y
a=a+s: ;degr. used for bending arms
If a>45 Then
s=-1*s
ElseIf a<0 Then
s=-1*s ;values turning back
EndIf
; Rotete/Turn pivots, thus making joints spin around
RotateEntity base,0,b,0 ;rotate base
RotateEntity pivot,0,b,-a+60 ;rotate whole robot
RotateEntity pivot1,0,0,a-120 ;rotate pivot1
RotateEntity pivot2,0,0,a-70 ;rotate pivot2
RotateEntity pivot3,0,0,a ;rotate pivot3
RenderWorld
Flip
Wend
End
|