-
Hi. I'm very excited to have found your libraries. I'd like to animate a scene, like you have done in rosys. I looked at the rosys code for a bit, hoping to see, but couldn't figure out what was going on. If you could provide a simple example, like translating a shape back and forth a short distance, while spinning it on an axis, that would be really helpful. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
To move a sphere you could do from nicegui import ui
with ui.scene(600, 400) as scene:
player = scene.sphere().move(0, 0, 1)
ui.joystick(on_move=lambda e: player.move(e.x + player.x, e.y + player.y, player.z))
ui.run() |
Beta Was this translation helpful? Give feedback.
-
That's great, thank you! This library and RoSys are amazing. They make so much of what I've been working toward so much easier. Is there a way to stack rotations? I'm trying to simulate a lathe chuck. So, I want to take a horizontal disk, and start it spinning around z. Then to take the output of that, and, still from the perspective of the world, to rotate it around y. I tried this, with no luck: I could reorient the model in OpenSCAD, but this seems like an important feature for my work. In the end, I'd like to be able to simulate and control robot arms and other machines (will start with simpler machines, and hope I find libraries that make robot arms simple). It's not something I know how to do yet, but something I've put a lot of work toward. Also, should I have opened this as a separate issue? |
Beta Was this translation helpful? Give feedback.
To move a sphere you could do