Tokamak zun ungenau?
Übersicht

![]() |
VertexBetreff: Tokamak zun ungenau? |
![]() Antworten mit Zitat ![]() |
---|---|---|
Hi!
Ich habe gestern mich mal mit Tokamak für ein Intro beschäftigt(Danke hier an Suco für die hilfe mit Tokamak!). Doch bin ich schwer entäuscht von dieser Physikengine. In Blitz habe ich alle Koordinaten etc. exakt von GMax übernehmen können, diese habe ich auch in Tokamak eingetragen. Doch erste Ernüchterung, als mein Ball die Holzlatte nicht herunterollt, obwohl dies auch bei 3° Steigung der Holzlatte schon passieren müsste. OK, also in Blitz 12° und in Tokamak 8° eingestellt, und für den Ball eine Masse von 70 übergeben, obwohl ich 0 Ahnung habe, ob das nun in Kilogramm sein soll, oder ob das imaginäre Einheiten sein sollen. Der Ball rollt, aber wie? Durch die Holzlatte durch (nein es liegt nicht an den Differenzen zwischen den 2 Winkeln, denn sie Rollt am Endstück der Holzlatte durch). Weiter gehts, habe Bauklötzer (die von EVOKE) auf einander gestabelt(also 3 Unten und 2 oben, und dann noch 4 kleine untenherum.) Die stehen im richtigen Leben 100% egal welche Masse die haben, sie würden sich höchstens bei Wind oder änlichen bewegen. Was machen sie Tokamak? Anfangen zu zittern, und das lustigste sich allmälisch durch den TOKAB Boden zu fressen. Der Boden ist übrigens eine Box. Ich konnte den Boden eine Höhe von 1, 10, 100, 1000 übergeben, die Klötzer fallen nur schneller oder langsamer durch den Boden, egal bei welcher Masse. Was ich noch besonders schön finde, das TOKRB_SetPosition und TOKRB_SetRotation anscheinend nur Wirkung auf den herunterrollenden Ball zeigen(filme die Szene 2 mal aus 2 Perspektiven wo der Ball herunterollt.) Die Bauklötzer liegen aber in der Endszene auch nach TOKRB_SetPosition/Rotation verstreut in der Szene als wären sie schon vom Ball überollt wurden, und erst später Rollt der Ball dann die Holzlatte herunter. ![]() (Ja der Ball soll auf die Holzlatte fallen) ![]() ![]() ![]() So jetzt meine Frage, habe ich nur falsche Werte übergeben, oder ist Tokamak wirklich so scheiße?! Und weiter, gibt es bessere und vorallem kostenlose(brauch nur für Freeware zu sein) Physikengines? mfg olli |
||
vertex.dreamfall.at | GitHub |
![]() |
Jan_Ehemaliger Admin |
![]() Antworten mit Zitat ![]() |
---|---|---|
hm, du musst noch die Massse in die mitte der Objekte setzten - frage mich jetzt nicht wie der Befehl heißt.
wenn du das gemacht haßt, müsste es gehen Psoudobefehl: set_Mass_Pos(Handle,x,y,z,Mass) |
||
between angels and insects |
![]() |
Vertex |
![]() Antworten mit Zitat ![]() |
---|---|---|
Ok, also anscheinend ist es besser nur ganze zahlen zu übergeben. Ich habe mal die Beispielszene mit Blitzprimitiven nachgebildet:
Code: [AUSKLAPPEN] ; setup graphicsmode
Graphics3D 800, 600, 32, 2 SetBuffer BackBuffer() ; setup Tokamak TOKSIM_SetRigidBodiesCount 10 ; 1 ball + 9 boxes TOKSIM_SetAnimatedBodiesCount 2 ; soil + wood TOKSIM_SetRigidParticleCount 0 TOKSIM_SetControllersCount 0 TOKSIM_SetGeometriesCount 12 ; 1 ball + 9 boxes + soil + wood TOKSIM_CreateSimulator 0, -5, 0 ; create scene ; - ball Dim ball(1) ball(0) = TOKRB_Create() TOKRB_AddSphere ball(0), 60 TOKRB_SetMass ball(0), 60 TOKRB_SetSphereInertiaTensor ball(0), 60, 60 TOKRB_SetPosition ball(0), 500, 416, -50 ball(1) = CreateSphere(15) ScaleEntity ball(1), 30, 30, 30 ; - boxes Dim boxes(8, 1) For i = 0 To 4 boxes(i, 0) = TOKRB_Create() TOKRB_AddBox boxes(i, 0), 40, 40, 40 TOKRB_SetMass boxes(i, 0), 2 TOKRB_SetBoxInertiaTensor boxes(i, 0), 40, 40, 40, 2 boxes(i, 1) = CreateCube() ScaleEntity boxes(i, 1), 20, 20, 20 Next For i = 5 To 8 boxes(i, 0) = TOKRB_Create() TOKRB_AddBox boxes(i, 0), 14, 14, 14 TOKRB_SetMass boxes(i, 0), 0.7 TOKRB_SetBoxInertiaTensor boxes(i, 0), 14, 14, 14, 0.7 boxes(i, 1) = CreateCube() ScaleEntity boxes(i, 1), 7, 7, 7 Next TOKRB_SetPosition boxes(0, 0), -28, 60, -20 TOKRB_SetPosition boxes(1, 0), 27, 60, -20 TOKRB_SetPosition boxes(2, 0), -56, 20, -19 TOKRB_SetPosition boxes(3, 0), 1, 20, -20 TOKRB_SetPosition boxes(4, 0), 57, 20, -19 TOKRB_SetPosition boxes(5, 0), -25, 7, -68 TOKRB_SetPosition boxes(6, 0), -7, 7, -67 TOKRB_SetPosition boxes(7, 0), 11, 7, -67 TOKRB_SetPosition boxes(8, 0), 29, 7, -67 TOKRB_SetRotation boxes(0, 0), 0, -7.5, 0 TOKRB_SetRotation boxes(1, 0), 0, 4.5, 0 TOKRB_SetRotation boxes(2, 0), 0, -18.5, 0 TOKRB_SetRotation boxes(3, 0), 0, 4, 0 TOKRB_SetRotation boxes(4, 0), 0, 19, 0 TOKRB_SetRotation boxes(5, 0), 0, -5, 0 TOKRB_SetRotation boxes(6, 0), 0, 7, 0 TOKRB_SetRotation boxes(7, 0), 0, 1.5, 0 TOKRB_SetRotation boxes(8, 0), 0, 3.5, 0 ; - soil Dim soil(1) soil(0) = TOKAB_Create() TOKAB_AddBox soil(0), 428, 2, 538 TOKAB_SetPosition soil(0), 0, -1, 0 soil(1) = CreateCube() ScaleEntity soil(1), 214, 1, 269 PositionEntity soil(1), 0, -1, 0 ; - wood Dim wood(1) wood(0) = TOKAB_Create() TOKAB_AddBox wood(0), 360, 8, 70 TOKAB_SetPosition wood(0), 340, 290, -50 TOKAB_SetRotation wood(0), 0, 0, 8 wood(1) = CreateCube() ScaleEntity wood(1), 180, 4, 35 PositionEntity wood(1), 340, 290, -50 RotateEntity wood(1), 0, 0, 8 ; setup camera target = CreatePivot() PositionEntity target, -148, 156, -282 camera = CreateCamera() CameraZoom camera, 1.0/Tan(45.0/2.0) ; FOV = 45° CameraRange camera, 1, 1500 PositionEntity camera, -425, 244, -585 PointEntity camera, target ; create light light = CreateLight(1, camera) ; scene While Not KeyDown(1) ; update tokamak TOKSIM_Advance 1.5/35.0, 1 ; update ball PositionEntity ball(1), TOKRB_GetX#(ball(0)), TOKRB_GetY#(ball(0)), TOKRB_GetZ#(ball(0)) RotateEntity ball(1), TOKRB_GetPitch#(ball(0)), TOKRB_GetYaw#(ball(0)), TOKRB_GetRoll#(ball(0)) ; update boxes For i = 0 To 8 PositionEntity boxes(i, 1), TOKRB_GetX#(boxes(i, 0)), TOKRB_GetY#(boxes(i, 0)), TOKRB_GetZ#(boxes(i, 0)) RotateEntity boxes(i, 1), TOKRB_GetPitch#(boxes(i, 0)), TOKRB_GetYaw#(boxes(i, 0)), TOKRB_GetRoll#(boxes(i, 0)) Next ; display scene UpdateWorld RenderWorld Flip Wend ; destroy tokamak and end TOKSIM_DestroySimulator End Wer es testen möchte: http://www.tokamakphysics.com/...ib_1_2.zip die dll http://www.freewebs.com/sweenie/twrapperv06.zip wrapper für blitz + userlib Doch was mich jetzt noch interessiert, wie bekomme ich den Ball schneller? TOKSIM_Advance 1.5/35.0, 1 ändere ich hier die 35 zu einem kleineren Wert, so wird die Szene falsch berechnet aber schneller oO Die Masse des Balls hat anscheinend nur Auswirkung auf die Beschleunigung. mfg olli |
||
vertex.dreamfall.at | GitHub |
INpac |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Jan_ hat Folgendes geschrieben: hm, du musst noch die Massse in die mitte der Objekte setzten - frage mich jetzt nicht wie der Befehl heißt.
wenn du das gemacht haßt, müsste es gehen Psoudobefehl: set_Mass_Pos(Handle,x,y,z,Mass) Wenn ich mich nicht irre, ist das tokrb_setboxintensor() o.ä ot: ich schau mir mal den code an, vllt kann ich helfen, ka.. ps: versuchs mal mit TOKSIM_Advance( 1.5/fps,1) außerdem empfehle ich, die negative-ygravi auf 10, oder 9.8 zu stellen... falls es wirklich angaben in newton sein sollten - hab zu den einheiten leider ebenfalls noch nichts gefunden. |
||
INpac |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
hi ich bins noch mal...
meine vermutung stimmte: der globale größenfaktor war zu groß... ich habs mal um es zu zeigen einfach per const einstellbar gelassen: Code: [AUSKLAPPEN] Const main_Scale# = .01 ; setup graphicsmode Graphics3D 800, 600, 32, 2 SetBuffer BackBuffer() ; setup Tokamak TOKSIM_SetRigidBodiesCount 10 ; 1 ball + 9 boxes TOKSIM_SetAnimatedBodiesCount 2 ; soil + wood TOKSIM_SetRigidParticleCount 0 TOKSIM_SetControllersCount 0 TOKSIM_SetGeometriesCount 12 ; 1 ball + 9 boxes + soil + wood TOKSIM_CreateSimulator 0, -10, 0 ; create scene ; - ball Dim ball(1) ball(0) = TOKRB_Create() TOKRB_AddSphere ball(0), 60*main_Scale TOKRB_SetMass ball(0), 2 TOKRB_SetSphereInertiaTensor ball(0), 60*main_Scale, 60*main_Scale TOKRB_SetPosition ball(0), 500*main_Scale, 416*main_Scale, -50*main_Scale ball(1) = CreateSphere(15) ScaleEntity ball(1), 30*main_Scale, 30*main_Scale, 30*main_Scale ; - boxes Dim boxes(8, 1) For i = 0 To 4 boxes(i, 0) = TOKRB_Create() TOKRB_AddBox boxes(i, 0), 40*main_Scale, 40*main_Scale, 40*main_Scale TOKRB_SetMass boxes(i, 0), .5 TOKRB_SetBoxInertiaTensor boxes(i, 0), 20*main_Scale, 20*main_Scale, 20*main_Scale, 2 boxes(i, 1) = CreateCube() ScaleEntity boxes(i, 1), 20*main_Scale, 20*main_Scale, 20*main_Scale EntityColor boxes(i, 1), Rand(255), Rand(255), Rand(255) Next For i = 5 To 8 boxes(i, 0) = TOKRB_Create() TOKRB_AddBox boxes(i, 0), 14*main_Scale, 14*main_Scale, 14*main_Scale TOKRB_SetMass boxes(i, 0), 0.7 TOKRB_SetBoxInertiaTensor boxes(i, 0), 7*main_Scale, 7*main_Scale, 7*main_Scale, 0.7 boxes(i, 1) = CreateCube() ScaleEntity boxes(i, 1), 7*main_Scale, 7*main_Scale, 7*main_Scale EntityColor boxes(i, 1), Rand(255), Rand(255), Rand(255) Next TOKRB_SetPosition boxes(0, 0), -28*main_Scale, 60*main_Scale, -20 *main_Scale TOKRB_SetPosition boxes(1, 0), 27*main_Scale, 60*main_Scale, -20 *main_Scale TOKRB_SetPosition boxes(2, 0), -56*main_Scale, 20*main_Scale, -19 *main_Scale TOKRB_SetPosition boxes(3, 0), 1*main_Scale, 20*main_Scale, -20 *main_Scale TOKRB_SetPosition boxes(4, 0), 57*main_Scale, 20*main_Scale, -19 *main_Scale TOKRB_SetPosition boxes(5, 0), -25*main_Scale, 7*main_Scale, -68 *main_Scale TOKRB_SetPosition boxes(6, 0), -7*main_Scale, 7*main_Scale, -67 *main_Scale TOKRB_SetPosition boxes(7, 0), 11*main_Scale, 7*main_Scale, -67 *main_Scale TOKRB_SetPosition boxes(8, 0), 29*main_Scale, 7*main_Scale, -67 *main_Scale TOKRB_SetRotation boxes(0, 0), 0, -7.5, 0 TOKRB_SetRotation boxes(1, 0), 0, 4.5, 0 TOKRB_SetRotation boxes(2, 0), 0, -18.5, 0 TOKRB_SetRotation boxes(3, 0), 0, 4, 0 TOKRB_SetRotation boxes(4, 0), 0, 19, 0 TOKRB_SetRotation boxes(5, 0), 0, -5, 0 TOKRB_SetRotation boxes(6, 0), 0, 7, 0 TOKRB_SetRotation boxes(7, 0), 0, 1.5, 0 TOKRB_SetRotation boxes(8, 0), 0, 3.5, 0 ; - soil Dim soil(1) soil(0) = TOKAB_Create() TOKAB_AddBox soil(0), 428*2*main_Scale, 2*main_Scale, 538 *2*main_Scale TOKAB_SetPosition soil(0), 0*main_Scale, -1*main_Scale, 0*main_Scale soil(1) = CreateCube() ScaleEntity soil(1), 214*2*main_Scale, 1*main_Scale, 269 *2*main_Scale PositionEntity soil(1), 0, -1*main_Scale, 0 ; - wood Dim wood(1) wood(0) = TOKAB_Create() TOKAB_AddBox wood(0), 360*main_Scale, 8*main_Scale, 70*main_Scale TOKAB_SetPosition wood(0), 340*main_Scale, 290*main_Scale, -50*main_Scale TOKAB_SetRotation wood(0), 0, 0, 8 wood(1) = CreateCube() ScaleEntity wood(1), 180*main_Scale, 4*main_Scale, 35*main_Scale PositionEntity wood(1), 340*main_Scale, 290*main_Scale, -50*main_Scale RotateEntity wood(1), 0, 0, 8 ; setup camera target = CreatePivot() PositionEntity target, -148*main_Scale, 156*main_Scale, -282*main_Scale camera = CreateCamera() CameraZoom camera, 1.0/Tan(45.0/2.0) ; FOV = 45° CameraRange camera, 1, 1500 PositionEntity camera, -425*main_Scale, 244*main_Scale, -585*main_Scale PointEntity camera, target ; create light light = CreateLight(1, camera) ; scene While Not KeyDown(1) ; update tokamak TOKSIM_Advance 1.5/85, 1 PointEntity camera, ball(1) ; update ball PositionEntity ball(1), TOKRB_GetX#(ball(0)), TOKRB_GetY#(ball(0)), TOKRB_GetZ#(ball(0)) RotateEntity ball(1), TOKRB_GetPitch#(ball(0)), TOKRB_GetYaw#(ball(0)), TOKRB_GetRoll#(ball(0)) ; update boxes For i = 0 To 8 PositionEntity boxes(i, 1), TOKRB_GetX#(boxes(i, 0)), TOKRB_GetY#(boxes(i, 0)), TOKRB_GetZ#(boxes(i, 0)) RotateEntity boxes(i, 1), TOKRB_GetPitch#(boxes(i, 0)), TOKRB_GetYaw#(boxes(i, 0)), TOKRB_GetRoll#(boxes(i, 0)) Next ; display scene RenderWorld Flip Wend ; destroy tokamak and end TOKSIM_DestroySimulator End damit sollte es gehen... |
||
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group