-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
I think the formula is incomplete. How I know this? I've ported your demonstration code to C with SDL3 library and made it showing more than one object. In my case there is one penguin and eight cubes - all rotating together. I've also made it rotating round both xz and yz. With more objects the fisheye effect could be seen better.
To workaround the fisheye effect I added a focal distance factor:
point_t project(point3d_t p) {
const float focal = 2.5f; // Focal distance of virtual lens
return (point_t){
x: (p.x / p.z) * focal,
y: (p.y / p.z) * focal
};
}You can find the whole code of this port in my GitHub: https://github.com/rostidev/formula
It looks like this:

Metadata
Metadata
Assignees
Labels
No labels