#Calaculating surface area of a bottle

198 messages · Page 1 of 1 (latest)

rocky jay
#

How would I use desmos to calculate the surfrace area of this bottle? because as u can see, the green section is not exactly straight so im not sure if that will affect the surfrace aprea

subtle yarrowBOT
candid pawn
#

saw this and thought you were building some type of bong

rocky jay
#

sooo, do you have any ideas how to deal with the optical illusion?

#

or could i just assume that from x=0, it doesnt matter

#

for more context, im seperating the clear part from the wrapper part

proven condor
rocky jay
proven condor
#

Could be something like this

#

The more details you add, the more functions you would add

rocky jay
#

oh, I see what you mean

#

like here, would i also calculate the area of that plastic and subtract it of

#

or just consider that an politcal illusion

proven condor
#

You could do n points, and always find a polynomial of n-1-th degree that interpolates these points

#

but the more you do, the more equations you would have to solve for

#

but you could let a computer do the work

#

it really depends what you want and need

rocky jay
#

i mean dont mind the amount of equations i need to solve

proven condor
rocky jay
#

i apologise

#

i dont rly understand

#

my maths knowledge is only at a HS students

proven condor
#

interpolation here just means to find a function passing through the points

rocky jay
#

ohhh

#

yea that make sense

rocky jay
proven condor
#

say you have two points

rocky jay
#

mhm

proven condor
#

if you want a function to pass throught these two points

#

that can do

#

a straight line

#

aka a linear function

#

which has degree 1

#

so for 2 points you would need a polynomial of 1 degree

#

so for n points you would need a polynomial of (n-1)th degree

rocky jay
#

ooooh

#

yes i understand

proven condor
#

so for 3 points

#

you would need a parabola

#

at the very least

rocky jay
#

x^2

proven condor
#

yup

#

ax^2+bx+c

languid magnetBOT
#

bacc (unhelpful)

proven condor
#

If we reduce it down to a formula

#

For one point, you would need at least a constant function

#

for example you want a function that goes through (2,1)

#

well y = 1 does that obviously

#

you can also take a polynomial of higher degree

#

but notice then you would get a system with infinite solutions

#

for example take a linear function

#

if it is supposed to just go through one specific point

#

then the other point can be anything

#

it still would go throught the intial point that you gave it

#

No matter how you choose A_1 there are infinite many ways with a linear function to pass one point

rocky jay
#

ohhh

#

yea, i understand that

#

i think ik what to do but im leaving this open to come back to it

#

in case i get stuck again

proven condor
#

yup do that!

rocky jay
#

so what i ended up doing

#

is finding 4 functions that fit to the bottle

#

where, sections that are vertically stragiht can distorted with curve

#

and so i can ignore that curved sparts, such as the wrapper past 0

#

when calculating surfrace of the bottle

#

since the wrapper is a where its straight

#

and i plan to use formula of cylinder

#

to calculate that

rocky jay
proven condor
#

looks amazing

#

but one notice

#

your image is off

#

you will notice it's a bit sides ways

rocky jay
#

okay im rly blind when it comes to details like, could u highlight what u mean if possible or circle it?

proven condor
#

yea like distorted

rocky jay
#

ohh

proven condor
#

and right

rocky jay
#

oh, i assumed

#

thats because

#

its a 3d object

#

and im tryna force it into a 2d

#

plane

proven condor
#

yyea

rocky jay
#

cuz this was the og one

#

so distortion is expected

proven condor
#

i guess you can change the fov of the camera or some

#

but shouldnt matter really for this project

rocky jay
#

yea

proven condor
#

did you know

rocky jay
#

mhm?

proven condor
#

you can also calculate integrals on desmos

rocky jay
#

fuck

#

off

rocky jay
proven condor
#

yup

rocky jay
#

oh i got it

proven condor
#

didnt even read it kekw

proven condor
languid magnetBOT
#

bacc (unhelpful)

proven condor
#

Now if you define your functions like f_1(x), f_2(x) etc

rocky jay
#

just testing but whats wrong here btw?

proven condor
#

you can also calculate the derivative with d/dx(f_1(x))

#

can you send link

rocky jay
#

oh nvm, i got it

proven condor
#

Do it like this

#

you will have more order

rocky jay
#

did u get the same?

proven condor
#

nope

proven condor
#

not area!

#

you rotate the function around the x-axis

#

and from that object you calculate the surface area

rocky jay
#

oh yea

#

that i understand

#

i was just testing the intergration section

proven condor
#

did you klick on the link

rocky jay
#

yes

rocky jay
#

i need to sleep, but i will be continuing this when i wake up, so i plan to leave thread up if i get stuck again in the future. Thank you so much bacc

#

also if i ask for help, may I ping you? if no, thats understandable and okay

proven condor
#

yea sure

rocky jay
#

thank you

unique oracle
#

I think this is much better suited to a program like blender

#

Which automatically tells you the surface area

green crystal
#

To deal with the optical ilusion use a chess section 4x4 and apply a bilineal transform. The section the bottle, for example the basic will be 3 secctions the top, the body an the bottom. Then divide with a line right in the middle, the for all sections approximate the outside curve ( the simpless method is putt a lot of points and the apply cubic splines) the you will have a function to describe the outside curve to all sections and then use the revolution surface theorem. thats is what I will do

#

Or you can download a scanner in your phone to get 3D model, upload tu cad and you will have it with a few clicks. But for me that is boring

green crystal
#

Omg, let I just read the preview msg. Lets do this complete. Well separate que the bottle in 3 sections. Top, body and bottom. Lets start for eliminate the distortion of the the camera. Please print a this cuadriculate.

#

Measure the with a ruler or print it with a definite side

#

Then put the bottle in this position

#

And then put the grid in one side like this

#

Off course the grid will not be perfect like the picture, but you know the real sides, so u can use bilineal transform. This can be apply with python, scilab or most simple matlab. This is an example

#

Now you have a image which not depend of the angle of you take the picture because u use the grid to center an put in place, and more you have que equivalence of inch or cm in pixels !!!

#

Now lets back to our bottle

#

now we need to get the middle, so we have many alternatives, erase the background to a empy space, then binarize the image. with binarize image have many options but the easy one in export in png. then the other easy opcion is go to, idl canvas, make a square bigger enough to paste the png bottle and use the automatic center. its important to have to know the pixels number of the new square. the import the image in any format

#

the go back to our program like matlab o scilab(is the same)

#

you know the withd of the new square so you can draw a line just in the middle, and you will have the perfect division.

#

now I recomend to cut in yhe middle the image and rotate to horizontal (please put the outside of the bottle up)

#

and there you go, now yo now the equivalence of the pixel in inch on mm or cm, but the real size

#

now can cotinuate use matlab but but can use any program to put point on the border of you mid bottle

#

now lets divide the problem in two ( lets solve the bottom later)

#

cut you image in the top and the body of the bottle

#

for the top put how many points u want, and you will have the cordinate points (x,y), maybe is simple use a high degree polynomial but in not very acurate, in image analysis the simple method realible is cubic spline. (if u dont leave matlab you only need to use a function) but if u leave matlab u need to make a equation system where you have to for every two point write a third degree polynomial and make equal tu the next in the share point, the you have to derivate and do the same , and then use the second derivate and do the same, the you will need another equation to make the system square and I recomend use the thrid redivate or if u have a rectangular matrix, multiply with his tanspose in both side. with his u will get the coeficients of all equations. for n many points you will have n-2 equations. so for any of this equations you have to use the surface area revolution theorem and add all the results and that its all. for the body do the same

#

but the bottom

#

you will have to use the skill u learn in the previews things I comment you to get the surface of that irregular shape

#

I hope this help u

rocky jay
rocky jay
green crystal
# rocky jay sure, but the point of doing this is to calculate the surface area using intergr...

Dear Nakama, you need to use integration, look
https://mathworld.wolfram.com/SurfaceofRevolution.html

A surface of revolution is a surface generated by rotating a two-dimensional curve about an axis. The resulting surface therefore always has azimuthal symmetry. Examples of surfaces of revolution include the apple surface, cone (excluding the base), conical frustum (excluding the ends), cylinder (excluding the ends), Darwin-de Sitter spheroid, G...

green crystal
#

its no complicate, dont understimate yourself, prepare your observation haki and I will show u the next level

#

and btw, I just give u the formal way to do it, there are more ways to do this

#

maybe, when I explain it I use all my coqueror haki

#

sorry

rocky jay
#

lmfao

#

i love one piece fans man

rocky jay
unique oracle
#

so you will need to use measurements and areas of revolution

#

very interesting post with interesting solutions i must say

green crystal
green crystal
#

but I must said, never use the excuse you dont have the level, you always can train yourself and improve you toolbox of abilities. open to teach yourself new skills, keep your mind open and u will be surprice of yourself

rocky jay
rocky jay
rocky jay
unique oracle
#

so the best way to measure the bottle and then use a curve to approximate the outline

#

then find the answer by using areas of revolution

rocky jay
#

okay so I was looking at how the function looks when i flipped

#

and see how the flip function isnt at the very end, does that my bottle isnt perfectly symetrical?

rocky jay
#

im assuming yes since my knowledge is that full revolution be fliped vertrically without chaning anything too much

rocky jay
#

and another question is how does resizing works? as the actual bottle to the img on desmos is ratio of

26 : 8.761

#

so id assume ill multiply the result from intergration by 8.761

#

would i multiply there area by 8.761^2? im assuming the latter as that follows the area rule where it become be squared

rocky jay
#

also how complicated would

#

is

rocky jay
#

.close