AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
C++ stack smashing detected3/9/2023 If ((yMax - yMin) != 0) perspective.Y = perspective.Y / (yMax - yMin) If ((xMax - xMin) != 0) perspective.X = perspective.X / (xMax - xMin) Std::cout << "yMax " << yMax << std::endl Std::cout << "yMin " << yMin << std::endl Std::cout << "xMax " << xMax << std::endl Std::cout << "xMin " << xMin << std::endl If (perspective.Y < yMin) yMin = perspective.Y If (perspective.X yMax) yMax = perspective.Y World.X = 0.0 world.Y = 0.0 world.Z = 50.0 // y-axisįloat sPheta = Ye / sqrt(pow(Xe, 2) + pow(Ye, 2)) įloat cPheta = Xe / sqrt(pow(Xe, 2) + pow(Ye, 2)) įloat sPhi = sqrt(pow(Xe, 2) + pow(Ye, 2)) / Rho įor (int i = 0 i xMax) xMax = perspective.X So I have the following code for graphics perspective projection: #include įloat Rho = sqrt(pow(Xe, 2) + pow(Ye, 2) + pow(Ze, 2))
0 Comments
Read More
Leave a Reply. |