Difference in shape, LxWxH, most similar proportions, regardless of scale

AI Thread Summary
To determine which shape most closely matches the proportions of a given rectangular prism, the RMS (Root Mean Square) difference method is suggested. This involves calculating the RMS for the original shape and comparing it to the RMS values of other shapes. The approach includes normalizing the dimensions to create unit vectors and using dot products to find geometric similarity. The method effectively identifies the closest match by evaluating the differences in proportions while ensuring the dimensions remain in the same order. This technique is particularly useful for applications requiring dimension comparison without concern for scale.
xinlo
Messages
3
Reaction score
0
this is not actually for homework, I am no longer in school, this is for a small application I am trying to write that compares dimensions. However, I believe this is the appropriate spot to post after reading the rules.

Homework Statement



okay, so let's say you got a shape, for example a rectangular prism.

192 x 210 x 212.

Then you have a list of other shapes and their dimensions

191,209,210
188,208,209
185,207,208
197,204,207
199,211,214

How would you pick the one that most closely matches the proportions of the original shape? scale does not matter, only proportions

Homework Equations



when its two dimensions its much simpler, you could just divide the length/width and pick the number closest to the result of the original.

The Attempt at a Solution



At first I had the idea of dividing the length/width and the length by the height seperately, figure the difference from the original shape, and then add those two differences together. The problem with this method is you can get large differences that are opposites, one positive and one negative that cancel each other out close to 0.

I don't need a solution to the above numbers, those numbers are just examples, I am just wanting to know what equation you would use to solve this type of problem.
 
Last edited:
Physics news on Phys.org
Welcome to PF xinlo!

Thanks for actually reading the site rules! You have posted in the right place.

xinlo said:
this is not actually for homework, I am no longer in school, this is for a small application I am trying to write that compares dimensions. However, I believe this is the appropriate spot to post after reading the rules.

Homework Statement



okay, so let's say you got a shape, for example a rectangular prism.

192 x 210 x 212.

Then you have a list of other shapes and their dimensions

191,209,210
188,208,209
185,207,208
197,204,207
199,211,214

How would you pick the one that most closely matches the proportions of the original shape? scale does not matter, only proportions

Homework Equations



when its two dimensions its much simpler, you could just divide the length/width and pick the number closest to the result of the original.

The Attempt at a Solution



At first I had the idea of dividing the length/width and the length by the height seperately, figure the difference from the original shape, and then add those two differences together. The problem with this method is you can get large differences that are opposites, one positive and one negative that cancel each other out close to 0.

I don't need a solution to the above numbers, those numbers are just examples, I am just wanting to know what equation you would use to solve this type of problem.

Hmm...the first thought that comes to mind is: try using the RMS difference.
 
Model rectangular prism LxWxH: 192 x 210 x 212

various rectangular prisms L,W,H
186,205,204
186,206,205
188,210,206
191,209,210
188,208,209
185,207,208
197,204,207
199,211,214
210,192,212 (should be farthest from a match)
384,420,424 (should be perfect match)

In the above data set I added one with the same dimensions but in a different order, also a couple where the width is greater than the height.
so my solving method should show those value as the least similar.
I also added one that has the exact same dimensions as the original only double, it should return the closest match.(perfect match)

below is how I did it, if I am reading wikipedia correctly: http://en.wikipedia.org/wiki/Root_mean_square

This is how I did it =SQRT(1/3(192^2+210^2+212^2))
(and then do the above for the other sets of dimensions and see which is closest.)

This RMS method would actually work perfectly it seems, if all data in the different sets is always L<W<H.

Also I realize when I originally asked the question, the data set I provided, this solution would have worked.
 
You want to find the one that is closest to being geometrically similar. Here's an idea. First write the dimensions of all the prisms in ascending order. Then let the three numbers be the three components of a vector from the origin. Divide each of the choices by the magnitude of the vector to get a unit vector. Then take the dot products of all the unit vectors with the unit vector for the subject shape. The one giving the dot product closest to unity is the one closest to being geometrically similar.
 
I ended up using the first suggestion, it ended up working perfectly, I just wasn't doing it correctly, given all objects have to remain facing the same direction (length cannot be swapped out for width.)

and then for y just plug in all other sets of numbers and the smallest value is the closest match.

=SQRT((x0/x2-y0/y2)^2 + (x1/x2-y1/y2)^2 + (x2/x2-y2/y2)^2)

x0,x1,x2 = 192,210,212 = 0
--------------------------------------------
y0,y1,y2 = 384,420,424 = 0
y0,y1,y2 = 191,209,210 = 0.006062527
y0,y1,y2 = 188,208,209 = 0.007700726
y0,y1,y2 = 186,206,205 = 0.014407578
y0,y1,y2 = 186,205,204 = 0.015581448
y0,y1,y2 = 185,207,208 = 0.016883492
y0,y1,y2 = 199,211,214 = 0.024675823
y0,y1,y2 = 188,210,206 = 0.029679298
y0,y1,y2 = 197,204,207 = 0.046307593
y0,y1,y2 = 210,192,212 = 0.120074736

Thank you both very much for the help :)
 
Last edited:
I multiplied the values first without the error limit. Got 19.38. rounded it off to 2 significant figures since the given data has 2 significant figures. So = 19. For error I used the above formula. It comes out about 1.48. Now my question is. Should I write the answer as 19±1.5 (rounding 1.48 to 2 significant figures) OR should I write it as 19±1. So in short, should the error have same number of significant figures as the mean value or should it have the same number of decimal places as...
Thread 'A cylinder connected to a hanging mass'
Let's declare that for the cylinder, mass = M = 10 kg Radius = R = 4 m For the wall and the floor, Friction coeff = ##\mu## = 0.5 For the hanging mass, mass = m = 11 kg First, we divide the force according to their respective plane (x and y thing, correct me if I'm wrong) and according to which, cylinder or the hanging mass, they're working on. Force on the hanging mass $$mg - T = ma$$ Force(Cylinder) on y $$N_f + f_w - Mg = 0$$ Force(Cylinder) on x $$T + f_f - N_w = Ma$$ There's also...
Back
Top