       Re: from a 2d-figure to an interactive 3d model? is it possible with mathematica?

• To: mathgroup at smc.vnet.net
• Subject: [mg126237] Re: from a 2d-figure to an interactive 3d model? is it possible with mathematica?
• From: Bob Hanlon <hanlonr357 at gmail.com>
• Date: Thu, 26 Apr 2012 05:30:39 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com

```Use Manipulate. Here is a partial example :

Manipulate[
Module[
{tan, ll, lr, ur, r, pt, t},
tan = Tan[30 Degree];
ll = {-w/2, -d/2};
lr = {w/2, -d/2};
ur = {w/2, d/2};
r = Sqrt[(20 + d/2)^2 + (w/2)^2];
pt = {x, y} /. FindRoot[
{tan == (x - w/2)/(y - d/2),
x^2 + y^2 == r^2}, {x, 12}, {y, 20}];
t = ArcTan @@ Reverse[pt];
Graphics[
{Thin, Circle[{0, 0}, 7],
Line[{{-7, -4}, {-7, 4}}],
Circle[{0, 0}, r, -90 Degree + {-t, t}],
{AbsoluteDashing[{6, 6, 72, 6}],
Line[{{0, 9}, {0, -22 - d/2}}]},
{White, EdgeForm[Thick],
Rectangle[ll, ur]},
{AbsoluteDashing[{8, 4}],
Table[Line[lr + # & /@
{{0, 0}, {0, -x}, {x*tan, -x}, {0, 0}}],
{x, 10, 20, 5}],
Line[{ll, -pt}]},
Text["High-                \ntemperature zone",
{-4.5, 4}, {-1, 0}],
Text["B=0.5774*A\nC=1.1547*A", {8, 3.5}, {-1, 0}],
Text["SI units: 1 in = 25.4 mm; 1 ft = 0.31 m",
{-w/2 - 15*tan, -23 - d/2}, {-1, 0}],
Text["B\n5ft 9-5/16in", {w/2 + 5*tan, -10 - d/2}],
Text["B\n8ft 7-7/8in", {w/2 + 7.5*tan, -15 - d/2}],
Text["B\n11ft 6-11/16in", {w/2 + 10*tan, -20 - d/2}],
Text["Intermediate-temperature\nzone",
{-w/4 - 7.5*tan, -r*Cos[t]}],
Text["Airflow", {-5*Tan[t], -9.5 - d/2}],
Arrow[{{-5*Tan[t], -10 - d/2},
{-5*Tan[t], -13 - d/2}}]}]],
{{w, 4., "Rectangle\nWidth (ft)"}, 1, 10, .01,
Appearance -> "Labeled"},
{{d, 2., "Rectangle\nDepth (ft)"}, 1, 10, .01,
Appearance -> "Labeled"}]

Bob Hanlon

On Wed, Apr 25, 2012 at 12:34 AM, luke wallace
<lukewallace1990 at gmail.com> wrote:
> http://postimage.org/image/jr35rwdel/
>
> the image above represents spacing rules for engineer stuff. if you
> look at it you will see the spacing can be summarized as:
>
> 1. 7 foot radius circle drawn around the center point of the
> rectangle. This never changes no matter what the dimensions of the
> rectangle. So we can ignore this.
>
> 2. On the south side of the rectangle, starting at the left and right
> corners, a 30 degree line is drawn (making a triangle ABC). Once the
> line reaches the 7 foot radius circle, it only goes 13 foot past it
> and then curves like a partial circle, keeping 20 feet maximum
> distance away from the center of the rectangle at all times. This
> changes if the rectangle size is manipulated.
>
> What I need is a way to put this into mathematica or some other
> program so I can make it interactive and say, okay my rectangle is 2
> foot long and 1 foot wide. Then the drawing would update and show what
> it looks like with that size rectangle, and then if someone needed the
> rectangle needs to be 3 foot long and 1.5 foot wide, it would auto
> update again without having to manually re-calculate by hand each
> time?
>

```

• Prev by Date: Re: FindFit and squared residuals
• Next by Date: Re: About linear programming
• Previous by thread: Re: from a 2d-figure to an interactive 3d model? is it possible with mathematica?
• Next by thread: Re: from a 2d-figure to an interactive 3d model? is it possible with mathematica?