C
C#3y ago
Vеrsette

Rotating image in 3D space

I have chose a library called Magick.NET (ImageMagick) for the image processing stuff, because it can run on Linux, etc It has a method called Distort that can do pretty much what I need by using DistortMethod.Perspective But the issue is that I want to input two angles (x and y rotation) for it to rotate the image plane, but this method accepts coordinates of a bounding box, and where to move them. It figures out the other stuff by itself. My initial idea was to assume that if I move the top right and bottom right pixels to the top left and bottom left pixels, it would be a 360 degree rotation. But the issue with that is that the perspective stuff wouldn't work then, because it works with changing the Y value of the destination pixels too, and I have no idea how to figure out that value based on only input of 2 angles of rotation. I would think that I probably have to do math stuff for that, but I have no idea where to take similar code from, or even what formula can be used for this.
1 Reply
Vеrsette
VеrsetteOP3y ago
Forgot to mention that I want to use this for creating an animated GIF, so I don't want to use things like MonoGame And I don't have any video adapter on my hosting machine, so I can't use GPU
Want results from more Discord servers?
Add your server