I don't have SDL installed, so I couldn't run your code. However, from what I can see the problem is not the calculation of the rotations (not 100% certain if they do not contain any mistakes, but they look fine), but the object you are rotating.
The problematic line is this function call in your main function:
rotation(angleX, angleY, angleZ, v[i].x, v[i]....
As DMGregory said, I just had to vary the radius variable.
// You simply have to multiply radius by any kind of random value
// I'm using perlin noise in this example
positions[v] = vec3(
c * cos(theta),
c * sin(theta)
) * radius * noiseValue(latitude, longitude)
There are a several ways to do it, but the general principle is the same:
You can morph between more than 2 meshes, but for this example, let's assume 2; the logic remains exactly the same for more of them.
At the root, each vertex is essentially two vertices (one from the source mesh, and one from the destination mesh) and you interpolate between the two, ...
I know this respond is late but for whoever will check this I highly recommend using Dot product aka scalar product (math) to see if the instances is in front of your "Freddy" character. Dot product returns the scalar which represents the length of the vector calculated by taking 2 vectors and the angle between them.
Dot product is extremely cheap as ...
In the Sims 4, you can drag to reshape the face when you create a sim. How is the geometry morphing implemented?
Only guys with access to the code can tell you that.
In general, how do you code a system that morphs different parts of a mesh?
I don't know if there is any commonly agreed way of doing this, but basically what you are asking is not as ...
We do not know the details of how they did it… However, there is a modding community for The Sims and they manage.
The idea is as follows: There is one base model for body type. There are series of sliders that can modify the base model. Each one will have a set of vertex they can modify, and a second target model. Then moving the slider is interpolating ...
Some of that pixelated look might be achievable by using normal 3D rendering with low-poly models and low-resolution textures, but render to a small texture instead of the screen, then draw that texture to the screen at a larger size with nearest neighbor filtering so the pixels don't get blurred.
The component you seem to be looking for is the TileMap.
A complete tutorial would be a bit too broad, and also redundant because there are many good tutorials for it available through your preferred search engine. So here just an overview:
A tilemap is empty at first. You need to paint tiles on it, either by hand or programmatically.
In order to do that, ...