Re: Galaxy Shape from points collection
Posted: Fri May 01, 2020 11:12 pm
Hello... Excuse me to be a little bit weight but, normally, it seems that we can exchange code simply. Imagine, I make a code of galaxy.
I prefer "follow" to keep a team spirit, and a functionnal coherence.
1st stop, my browser : Do want to use this as browser by default ?!?
No... I just want to upload a code.
2nd stop, my search engine : Your search engine uses cookie etc...
No. I just want to upload my f.. !
3th stop, the forum : Do you know tapatalk ? Do you want to...
NO. I just want to...
4th stop, the forum : Ad... LA MARINE NATIONALE RECRUTE.
Noo! I just want share my w... ! Sh...
Okay now, I reach the dialog I do not describe to you, such it is shame or ergonomy...
We are in 2020, and the law of Moore I do not see the progress
of the net...
I just wanted to say you this little message, dear contributors above : none of your links are available, no image, nothing...
Sure I am able to communicate with you privately, or not. Sure my work below is not the best code of the century. Sure it is not the first equation I discover before the best mathematician. But just it represents MY pleasure I want to share with you : simple !!!
1) you copy the code from here and paste it on your IDE
2) you paste it, execute it, and it is okaaaay !
Just a fly in the dark of the space.
I drew 2 galaxies. And KCC asked me if the speed should be rightly accelerated. So I multiplied by 100 the initial.
Now all the physicians on the world want to kill me because the speed is wildly over the light speed, but... It was his wish to KCC...
You fly in the only with the mouse.
Left, right, front and back mouse direction to rotate.( z and x axis)
Left and right click to rotate (y axis)
Wheel up and down to speed.
Have a good fly !!
Thank you !and where is f... button to submit : it is behind the dialog box!!! (I must turn the smartphone to get it... Unable to use clipboard... 6 gigabytes of updating datas 2020... 2020 progress...)
I prefer "follow" to keep a team spirit, and a functionnal coherence.
1st stop, my browser : Do want to use this as browser by default ?!?
No... I just want to upload a code.
2nd stop, my search engine : Your search engine uses cookie etc...
No. I just want to upload my f.. !
3th stop, the forum : Do you know tapatalk ? Do you want to...
NO. I just want to...
4th stop, the forum : Ad... LA MARINE NATIONALE RECRUTE.
Noo! I just want share my w... ! Sh...
Okay now, I reach the dialog I do not describe to you, such it is shame or ergonomy...
We are in 2020, and the law of Moore I do not see the progress
of the net...
I just wanted to say you this little message, dear contributors above : none of your links are available, no image, nothing...
Sure I am able to communicate with you privately, or not. Sure my work below is not the best code of the century. Sure it is not the first equation I discover before the best mathematician. But just it represents MY pleasure I want to share with you : simple !!!
1) you copy the code from here and paste it on your IDE
2) you paste it, execute it, and it is okaaaay !
Just a fly in the dark of the space.
I drew 2 galaxies. And KCC asked me if the speed should be rightly accelerated. So I multiplied by 100 the initial.
Now all the physicians on the world want to kill me because the speed is wildly over the light speed, but... It was his wish to KCC...
You fly in the only with the mouse.
Left, right, front and back mouse direction to rotate.( z and x axis)
Left and right click to rotate (y axis)
Wheel up and down to speed.
Have a good fly !!
Thank you !
Code: Select all
;***************************************************************************************************************************************************************************************************************************************************
Global.D cg, ZZ = 1000.0, PowMount = 80.0, Radius, Teta, Anti, Teta2, Rho2, axCam, ayCam, azCam, vxCam, vyCam, vzCam
Global BackGC = 31
InitEngine3D()
InitSprite()
InitKeyboard()
InitMouse()
ExamineDesktops()
OpenScreen(DesktopWidth(0), DesktopHeight(0), 32, "", #PB_Screen_SmartSynchronization, DesktopFrequency(0) )
CreateTexture(1, 1, 1, "")
If StartDrawing(TextureOutput(1) )
Box(0, 0, 1, 1, RGB(255, 255, 255) )
StopDrawing()
EndIf
CreateMaterial(0, TextureID(1) )
DisableMaterialLighting(0, #True)
For J = 1 To 2
CreateMesh(J, #PB_Mesh_PointList, #PB_Mesh_Dynamic)
SetMeshMaterial(J, MaterialID(0))
For i = 1 To 3 * (300000 - ((J - 1) * 295000) )
Radius = 1.0 + Random(Random(10000) ) / 100.0
Teta = Random(1) * #PI
Teta2.D = Random(628) / 100.0
Rho2.D = Random(1500) / 100.0
MeshVertexPosition((Cos(Radius / 8.0 + Teta) * Radius + (Cos(Teta2) * Rho2))*ZZ, (Random(8000.0 / Sqr(Sqr(Radius) ) ) / 1000.0 * ((Random(1) * 2.0) - 1.0))*ZZ, (Sin(Radius / 8.0 + Teta) * Radius + (Sin(Teta2) * Rho2)) *ZZ)
cg = BackGC + Pow(Random(100)/100, PowMount)*(255 - BackGC)
MeshVertexColor(RGBA(cg,cg, cg, cg))
Next i
FinishMesh(#False)
CreateNode(J)
AttachNodeObject(J, MeshID(J))
Next
MoveNode(2, 100000, 1000000, 0, #PB_Absolute)
RotateNode(2, 0, 30, 0)
CreateCamera(0, 0, 0, 100, 100)
cams = CreateNode(#PB_Any)
AttachNodeObject(cams, CameraID(0))
CameraRange(0, 1, 1000000000)
MoveNode(cams, 0, 40, 150, #PB_Absolute)
CameraFOV(0, 90)
NodeLookAt(cams, NodeX(1), NodeY(1), NodeZ(1))
MoveNode(cams, 0.0, 0.0, -100)
Repeat
ExamineKeyboard()
ExamineMouse()
vyCam + 0.01 * (Bool(MouseButton(1) ) - Bool(MouseButton(2) ) )
vyCam * 0.99
RotateNode(cams, 0.0, vyCam, 0.0, #PB_Relative)
NodeFixedYawAxis(cams, #False)
axCam = MouseDeltaY() / 100.0
vxCam + axCam
vxCam * 0.9
RotateNode(cams, vxCam, 0.0, 0.0, #PB_Relative)
NodeFixedYawAxis(cams, #False)
azCam = - MouseDeltaX() / 100.0
vzCam + azCam
vzCam * 0.9
RotateNode(cams, 0.0, 0.0, vzCam, #PB_Relative)
NodeFixedYawAxis(cams, #False)
camz.D - MouseWheel() * 10.0
MoveNode(cams, 0.0, 0.0, camz, #PB_Absolute | #PB_Local)
RenderWorld()
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape) Or Quit = 1 Or MouseButton(3)