The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   The Coat Room (http://hintsforums.macworld.com/forumdisplay.php?f=8)
-   -   Math Question relating to art (http://hintsforums.macworld.com/showthread.php?t=104194)

janet333 08-07-2009 12:50 PM

Math Question relating to art
 
1 Attachment(s)
I have a food container that I am trying to create a label for that will, of course lay flat on the angled surface and the ends will meet perfectly.

The top is 4.45" Diameter (C=14")
The bottom is 4" Diameter (C=12.6")
Height of package is 1.4"

I figure this as a 14.75˚ angle in Illustrator (just drawing lines at angle from bottom to top and looking at info pallete

So, If I have a label drawn that is 14" at the top and 12.6" at the bottom how much would I need to raise the center points at the top and the bottom to arch the label to achieve the result above.

I need a formula, if one exists, and I'm sure it does, to plug these numbers into and get the desired result.

I tried creating two ovals – the sizes indicated (each 1.4" deep). I took the bottom 1/2 segment off the top oval and the bottom 1/2 segment off of the bottom oval then joined the endpoints on either side. The distance between the top and bottom segments is 1.4" apart. Seems like a common sense approach, but, alas it did not work.

Thanks in advance for any help

baf 08-07-2009 01:43 PM

I'm working on it but a question:
With height do you mean depth or the length of the sloping side?

baf 08-07-2009 01:47 PM

Also is this a one off; so you just want the answer or do you want a formula/recipe?

NovaScotian 08-07-2009 02:15 PM

Google is your friend (as Hayne would say):

See: Formulae here

janet333 08-08-2009 09:21 AM

Quote:

Originally Posted by baf (Post 546041)
I'm working on it but a question:
With height do you mean depth or the length of the sloping side?

Depth that the label has to be (not the sloping sides). Would the depth not have to be the same all the way around?

janet333 08-08-2009 09:22 AM

Quote:

Originally Posted by baf (Post 546043)
Also is this a one off; so you just want the answer or do you want a formula/recipe?

Need a formula

janet333 08-08-2009 09:25 AM

Quote:

Originally Posted by NovaScotian (Post 546046)
Google is your friend (as Hayne would say):

See: Formulae here


This one really scares me – any way to dumb it down so I can just plug the numbers provided in my attachment. Been a long time since math class!

cwtnospam 08-08-2009 11:30 AM

Code:

        Truncated Cone
height h of the truncated cone :        1.4
radius a of the small base :        2
radius b of the large base :        2.225
small radius R1 :       
big radius R2 :       
angle x in degrees :       
lateral area Al :       
volume V :

Click Calculate

hayne 08-08-2009 12:12 PM

The easiest way to solve this is to:
a) realize that your container is a horizontal slice of a cone
b) realize that "unwrapping" a cone would give you a section of a circle that is shaped like a piece of pie (see: http://demonstrations.wolfram.com/UnfoldingACone/)
c) draw your label on that "piece of pie". (You can easily calculate the radii of the two circles that bound the part you are interested in.)

janet333 08-08-2009 06:11 PM

thanks all, gonna try this tomorrow when i get a chance and let you know how it goes.

NovaScotian 08-08-2009 06:36 PM

Looking at Janet's attachment again, I see that the container is said to be oval. Does that mean that the top and bottom are not circles?

janet333 08-08-2009 08:51 PM

Quote:

Originally Posted by NovaScotian (Post 546158)
Looking at Janet's attachment again, I see that the container is said to be oval. Does that mean that the top and bottom are not circles?

The top and bottom ARE circles. Sorry for anything misleading.

Tracing the bottom of the package yields 4" and the top 4.45 circles.

chabig 08-09-2009 07:10 AM

And the answer is (thanks to cwtnospam):

Code:

        Truncated Cone
height h of the truncated cone : 1.4
radius a of the small base : 2
radius b of the large base : 2.225
small radius R1 :        12.60
big radius R2 : 14.02
angle x in degrees : 57.12

So you draw two concentric circles, one with radius 12.6 and the other with radius 14.02. Take a 57 degree slice and there you go!

NovaScotian 08-09-2009 09:32 AM

Here's a little AppleScript to do it:


-- Frustum of a Cone

set Top to 4.45 -- diameter
set Bot to 4.0 -- diameter
set TopR to Top / 2
set BotR to Bot / 2
set Hgt to 1.4 -- assumed to be depth of container, formulae different for slant height
set SlantHgt to sqrt (Hgt ^ 2 + (TopR - BotR) ^ 2) -- from bottom rim to top rim
set FullSlantHgt to (TopR * SlantHgt) / (TopR - BotR) -- radius from point to big edge
set BotCurveRad to FullSlantHgt - SlantHgt
set Angle to 360 * (TopR - BotR) / SlantHgt -- degrees included in developed frustum

cwtnospam 08-09-2009 11:00 AM

1 Attachment(s)
:D

Might as well graph it:

PHP Code:

<?php
$Top 
4.45// -- diameter
$Bot 4.0// -- diameter
$TopR $Top 2;
$BotR $Bot 2;
$Hgt 1.4// -- assumed = be depth of container, formulae different for slant height
$SlantHgt sqrt (pow($Hgt,2) + pow(($TopR $BotR),2)); // -- from bottom rim = top rim
$FullSlantHgt = ($TopR $SlantHgt) / ($TopR $BotR); // -- radius from point = big edge
$BotCurveRad $FullSlantHgt $SlantHgt;
$Angle 360 * ($TopR $BotR) / $SlantHgt// -- degrees included in developed frustum

$im imagecreatetruecolor(800700);
$text_color imagecolorallocate($im2331491);
$back imagecolorallocate($im,255,255,255);
$dot imagecolorallocate($im,30,30,30);
imagefill($im00$back);
$Angle $Angle 3.14159/180;
draw_arc($FullSlantHgt0$Angle);
draw_arc($BotCurveRad0$Angle);

header('Content-type: image/png');
imagepng($im);

function 
draw_arc($radius$start_angle$end_angle)
{
    
$radius *=50;
    Global 
$dot;
    Global 
$im;
    
$first_x $radius cos($start_angle);
    
$first_y $radius sin($start_angle) + 50;
    for(
$i=$start_angle*100$i<= $end_angle*100$i++)
    {
        
$second_x $radius cos($i/100);
        
$second_y $radius sin($i/100) + 50;
        
imageline($im$first_x,$first_y,$second_x,$second_y$dot);
        
$first_x $radius cos($i/100);
        
$first_y $radius sin($i/100) + 50;
    }
}
?>

Still needs to be scaled properly. ;)

In case you don't have php, see attachment! Scale the image so that the two arcs are 1.418 inches apart and it should work.

janet333 08-09-2009 01:10 PM

Quote:

Originally Posted by cwtnospam (Post 546200)
:D

Still needs to be scaled properly. ;)

In case you don't have php, see attachment! Scale the image so that the two arcs are 1.418 inches apart and it should work.

Am using Adobe Illustrator. Sort of busy today so I just placed your image in AI and traced and scaled it. Fit perfectly. Haven't perused so many formulas looking for this answer in, well, never actually. Last time I saw Pi was when I watched the movie and I feel like the lead character, well not that bad I guess. Anyway, fit perfectly on intended container. Will try some of these other "from scratch" later. Thanks again!;)

cwtnospam 08-09-2009 03:00 PM

Heh, I was thinking how this would actually make a good real world example for a math class.

Glad it worked though!

janet333 08-10-2009 08:14 PM

Quote:

Originally Posted by chabig (Post 546181)
And the answer is (thanks to cwtnospam):

Code:

        Truncated Cone
height h of the truncated cone : 1.4
radius a of the small base : 2
radius b of the large base : 2.225
small radius R1 :        12.60
big radius R2 : 14.02
angle x in degrees : 57.12

So you draw two concentric circles, one with radius 12.6 and the other with radius 14.02. Take a 57 degree slice and there you go!


Do you have a graphics program that would allow you to draw out what you are saying here. Not sure where you got the 57.12˚ angle. Even something scratched out on a pad and scanned in.

Since cwtnospam got me through my project I'd like to slow down and KNOW how to solve these issues in the future.

First of all what Numbers do I NEED to figure the equation? Circumference, diameter, radius? When you tell me to draw two concentric circles, one with radius of 12.6 and the other with radius 14.02, you are actually referring to the circumference correct?

The largest part of the container (the top) measures 4.45" (diameter) and the bottom is 4" (diameter).

So for the top circle the circumference would be 4.45 * pi = 13.973
And for the bottom circle circumference would be 4 * pi = 12.56
Correct?

Again, not sure where you're finding the angle. Thanks for the patience!;)

cwtnospam 08-10-2009 08:22 PM

1 Attachment(s)
Think of your food container as being part of a giant sugar cone. You only need the part of the cone where the diameter goes from 4.45" down to 4", so the rest of the cone isn't used. The distance from the 4" section to the pointy part of the cone is small Radius R1 and the distance from 4.45" to the pointy end is R2.

The angle 57.12° is the angle that would be created if you sliced the cone from the pointy end straight up to the top (R2) and spread the cone flat on a table.

See image below.

jbc 08-10-2009 10:05 PM

It's easy to replicate this in your Illustrator app. Draw two circles with the correct radii, align the centers, draw a horizontal line from the center to the outer edge, then use the Rotate tool to rotate a copy of the line by -57.12° about the center. You should end up with a drawing pretty much like cwtnospam's drawing - the outer band within the angle is where you need to design your label (may want to rotate everything by 118.56° though to get the label "horizontal"). lt took me about three minutes to put this up in Illustrator here.

janet333 08-10-2009 10:22 PM

Quote:

Originally Posted by cwtnospam (Post 546413)
Think of your food container as being part of a giant sugar cone. You only need the part of the cone where the diameter goes from 4.45" down to 4", so the rest of the cone isn't used. The distance from the 4" section to the pointy part of the cone is small Radius R1 and the distance from 4.45" to the pointy end is R2.

The angle 57.12° is the angle that would be created if you sliced the cone from the pointy end straight up to the top (R2) and spread the cone flat on a table.

See image below.

GOT IT! – thanks again:cool:

janet333 08-10-2009 10:29 PM

Quote:

Originally Posted by jbc (Post 546431)
It's easy to replicate this in your Illustrator app. Draw two circles with the correct radii, align the centers, draw a horizontal line from the center to the outer edge, then use the Rotate tool to rotate a copy of the line by -57.12° about the center. You should end up with a drawing pretty much like cwtnospam's drawing - the outer band within the angle is where you need to design your label (may want to rotate everything by 118.56° though to get the label "horizontal"). lt took me about three minutes to put this up in Illustrator here.

Thanks – sounds easy enough once you know what you're looking for. The angle was throwing me. I'll give it a shot tomorrow!;)


All times are GMT -5. The time now is 03:24 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.