Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #15580
| From | "Dr. Wolfgang Hintze" <weh@snafu.de> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Output display by slide |
| Date | 2013-10-02 09:53 +0000 |
| Message-ID | <l2gqe1$lqs$1@smc.vnet.net> (permalink) |
| References | <l2e7mv$fe2$1@smc.vnet.net> |
| Organization | Time-Warner Telecom |
Am Dienstag, 1. Oktober 2013 12:21:19 UTC+2 schrieb Narasimham:
> a=3; b=2.5; c=2 ;
>
> (* Given triangle vertices are {(0,0),(x1,y1),(x2,y2)} = { (0,0),(a,0),(b,c) } to find CG *)
>
> v1=Graphics[Circle[{0,0},{.03,.03}]];v2=Graphics[Circle[{a,0},{.03,.03}]];v3=Graphics[Circle[{b,c},{.03,.03}]];
>
> x1=a;y1=0;x2=b;y2=c; {XF,YF}={x1+x2, y1+y2}/3;
>
> CG=Graphics[Disk[{XF,YF},{.05,.05} ]];
>
> Triang=Graphics[Line[{{0,0},{a,0},{b,c},{0,0},{XF,YF},{a,0},{XF,YF},{b,c},{XF,YF},{0,0}}] ] ;
>
> bb=Show[{v1,v2,v3,Triang,CG},GridLines->Automatic,Axes-> True ,AspectRatio-> Automatic, PlotLabel-> "Centre of Gravity"]
>
>
>
> How to vary b value in a SlideView or Manipulate, say between 0 to 4, (along horizontal line y =2) to display Centre of Gravity like it is in GSP or in Java mode ?
>
>
>
> TIA,
>
> Narasimham
Did you mean something like this?
a = 3; c = 6;
Manipulate[v1 = Graphics[Circle[{0, 0}, {0.03, 0.03}]];
v2 = Graphics[Circle[{a, 0}, {0.03, 0.03}]];
v3 = Graphics[Circle[{b, c}, {0.03, 0.03}]];
x1 = a; y1 = 0; x2 = b; y2 = c;
{XF, YF} = {x1 + x2, y1 + y2}/3;
CG = Graphics[Disk[{XF, YF}, {0.05, 0.05}]];
Triang =
Graphics[Line[{{0, 0}, {a, 0}, {b, c}, {0, 0}, {XF, YF}, {a,
0}, {XF, YF}, {b, c}, {XF, YF}, {0, 0}}]];
bb = Show[{v1, v2, v3, Triang, CG},
PlotRange -> {{0, 4}, {0, 6}}, GridLines -> Automatic,
Axes -> True, AspectRatio -> Automatic,
PlotLabel -> "Centre of Gravity"], {b, 0, 4}]
Best regards,
Wolfgang
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread
Output display by slide Narasimham <mathma18@gmail.com> - 2013-10-01 10:21 +0000 Re: Output display by slide "Dr. Wolfgang Hintze" <weh@snafu.de> - 2013-10-02 09:53 +0000
csiph-web