Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8503245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:42:20+00:00 2026-06-11T01:42:20+00:00

I have a mesh model in X, Y, Z format. Lets say. Points *P;

  • 0

I have a mesh model in X, Y, Z format. Lets say.

Points *P;

In first step, I want to normalize this mesh into (-1, -1, -1) to (1, 1, 1).
Here normalize means to fit this mesh into a box of (-1, -1, -1) to (1, 1, 1).

then after that I do some processing to normalized mesh, finally i want to revert the dimensions to similar with the original mesh.

step-1:
P = Original Mesh dimensions;

step-2:
nP = Normalize(P); // from (-1, -1, -1) to (1, 1, 1)

step-3:
cnP = do something with (nP), number of vertices has increased or decreased.

step-4:
Original Mesh dimensions = Revert(cnP); // dimension should be same with the original mesh

how can I do that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T01:42:22+00:00Added an answer on June 11, 2026 at 1:42 am

    I know how easy it can be to get lost in programming and completely miss the simplicity of the underlying math. But trust me, it really is simple.

    The most intuitive way to go about your problem is probably this:

    1. determine the minimum and maximum value for all three coordinate axes (i.e., x, y and z). This information is contained by the eight corner vertices of your cube. Save these six values in six variables (e.g., min_x, max_x, etc.).

    2. For all points p = (x,y,z) in the mesh, compute

      q =  ( 2.0*(x-min_x)/(max_x-min_x) - 1.0
             2.0*(y-min_y)/(max_y-min_y) - 1.0
             2.0*(z-min_z)/(max_z-min_z) - 1.0 )
      

      now q equals p translated to the interval (-1,-1,-1) -- (+1,+1,+1).

    3. Do whatever you need to do on this intermediate grid.

    4. Convert all coordinates q = (xx, yy, zz) back to the original grid by doing the inverse operation:

      p =  ( (xx+1.0)*(max_x-min_x)/2.0 + min_x
             (yy+1.0)*(max_y-min_y)/2.0 + min_y
             (zz+1.0)*(max_z-min_z)/2.0 + min_z )
      
    5. Clean up any mess you’ve made and continue with the rest of your program.

    This is so easy, it’s probably a lot more work to find out which library contains these functions than it is to write them yourself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this object I'm loading with THREE.objLoader and then create a mesh with
have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:
I have a mesh defined by 4 points in 3D space. I need an
I have an existing Silverlight 3 app that I want to add Live Mesh
If I have three points and always want the visible face should be the
I have a mesh in a form like this . with a list of
This topic has been discussed but I've been unsuccessful. I have a basic mesh
I have two classes, Mesh and MeshList. I want MeshList to have a function
I have a terrain mesh where just the Z value for each vertex needs
I have an irregular mesh which is described by two variables - a faces

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.