This may not be related to computer games but I am having trouble workign on this in our editor/tool.
I have a cone defined in 3D and as a standard it is defined via the parameters apex, angle and axis/direction. We also derived the hmin and hmax or the minimum and maximum height position along the axis from the apex where the nearest and the farthest point in the mesh that has data.I can compute the top and bottom parameters based on the given parameters.
See illustration of what our cone looks like with its parameters.
![](https://uploads.gamedev.net/forums/monthly_2023_09/medium.7bd71b25cc75439ca68fd44debd7bc01.image.webp)
The black line at the side of the cone is just for illustration by the way, but the only thing rendered in our ap is the mesh from the hmin to hmax mesh.
In our application, we allow editing of the cone by dragging either the top or the button surfaces.(colored red bellow)
![](https://uploads.gamedev.net/forums/monthly_2023_09/bec71f80eef8499fb7e229da823b33bb.image.png)
say for example, when the top is dragged, I am having a hard time on how to update the other parameters based on the new mesh look.
![](https://uploads.gamedev.net/forums/monthly_2023_09/medium.7d88292c28a3464b97e991a20d046662.image.webp)
What I will have is a new height (which is the height between hmin and hmax), and I want to know how to compute for the new angle, the new hmin and hmax and new apex.
technically, I also have the information about the top radius (radius at hmin) and bottom radius.
From the graphics above, both the top and bottom radius did not change. So I think we can use it as well to compute for the updated parameters (I assume)
Anyone can help?