#Calaculating surface area of a bottle
198 messages · Page 1 of 1 (latest)
saw this and thought you were building some type of bong
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
I would make two functions
and what would that be for?
Could be something like this
The more details you add, the more functions you would add
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
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
i mean dont mind the amount of equations i need to solve
could you elaborate on this?
Equivalent to a 50 minute university lecture on convolution-based interpolation methods.
0:00 - intro
0:31 - 1D convolution
1:02 - linear interpolation with a hat filter
2:12 - deriving the sinc function
3:33 - ringing
4:19 - cubic and lanczos filters
4:51 - 2D interpolation filters
Graphics in 5 minutes is a series of cartoon-style videos tha...
interpolation here just means to find a function passing through the points
then let me reprhase, what did u mean by these points?
say you have two points
mhm
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
x^2
bacc (unhelpful)
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
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
yup do that!
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
how thos sound?
looks amazing
but one notice
your image is off
you will notice it's a bit sides ways
sideways?
okay im rly blind when it comes to details like, could u highlight what u mean if possible or circle it?
yea like distorted
if you look on the left
and right
oh, i assumed
thats because
its a 3d object
and im tryna force it into a 2d
plane
yyea
i guess you can change the fov of the camera or some
but shouldnt matter really for this project
yea
did you know
mhm?
you can also calculate integrals on desmos
actually??
yup
i apologise if this came off rudely, it was more out of amazement
oh i got it
didnt even read it 
oh nice
bacc (unhelpful)
Now if you define your functions like f_1(x), f_2(x) etc
just testing but whats wrong here btw?
nope
taht's the formula for the surface
not area!
you rotate the function around the x-axis
and from that object you calculate the surface area
did you klick on the link
yes
yes this much more orgranised
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
yea sure
thank you
I think this is much better suited to a program like blender
Which automatically tells you the surface area
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
Cubic splines, a single polinomial is not enough
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
sure, but the point of doing this is to calculate the surface area using intergration
thank you fellow one piece enjoyer for the steps, but i dont think my math skills is high enough to do what you said, sorry
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...
In 3 hours I will be able to help u, if u want we can make a call and I can guide u Nakana
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
i get that i need to use intergration, like this is how ive gone abt it.
Ive split the bottle into 3 parts.
left side, i need to find the function for
middle is formula for cylinder
right side, ive found the functions for as seen on left of the picture
the problem is parrallax
so you will need to use measurements and areas of revolution
very interesting post with interesting solutions i must say
for a undergraduated works! well done Nakama
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
is this the distortion?
thank youuu
thank you for stating that, that helps alot actually to explain distortion
yes as in if you have ever traced a referene it will be inconsistent because of perspective
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
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?
im assuming yes since my knowledge is that full revolution be fliped vertrically without chaning anything too much
this formula is used when rotating against the x axis correct?
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
.close