Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #16849
| Path | csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newspeer1.nac.net!newspump.sol.net!post2.nntp.sol.net!posts.news.twtelecom.net!nnrp3.twtelecom.net!not-for-mail |
|---|---|
| From | Alexei Boulbitch <Alexei.Boulbitch@iee.lu> |
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: A simple Solve gives me errors |
| Date | Thu, 24 Apr 2014 08:03:37 +0000 (UTC) |
| Sender | steve@smc.vnet.net |
| Approved | Steven M. Christensen <steve@smc.vnet.net>, Moderator |
| Message-ID | <ljaggp$br$1@smc.vnet.net> (permalink) |
| Lines | 54 |
| Organization | Time-Warner Telecom |
| NNTP-Posting-Date | 24 Apr 2014 08:09:46 GMT |
| NNTP-Posting-Host | e554b938.news.twtelecom.net |
| X-Trace | DXC=Na3fQ5ea6ZT`NIIejLkL`^C_A=>8kQj6];[h;PUXBgbTW:Sk\@?4VCVEFiONJ7[GoV=5_A@AgZAmY |
| X-Complaints-To | abuse@twtelecom.net |
| Xref | csiph.com comp.soft-sys.math.mathematica:16849 |
Show key headers only | View raw
I want to find the center C of a circle in 3D where the plane is defined
by points p1,p2,p3. I wrote this:
p1 = {p1x, p1y, p1z}; (* tell it that p1,p2,p3 are vectors *)
p2 = {p2x, p2y, p2z}; (* center of circle ctr = f p1+g p2+(1-f-g)p3 *)
p3 = {p3x, p3y, p3z}; (* keep the center in the plane of p1,p2,p3 *)
ctr = f p1 + g p2 + (1 - f - g) p3;
eq1 = (ctr - p1).(ctr - p1) - (ctr - p2).(ctr - p2) := 0;
eq2 = (ctr - p1).(ctr - p1) - (ctr - p3).(ctr - p3) := 0;
I get errors of a type I've seen before:
SetDelayed::write: Tag Norm in Norm[{-p1x+f p1x+g p2x+(1-f-g) p3x,-p1y+f
p1y+g p2y+(1-f-g) p3y,-p1z+f p1z+g p2z+(1-f-g) p3z}] is Protected. >>
And a similar one. I don't know what to do about this.
I want to do
Solve[{eq1, eq2}, {f, g}]
Hi,
It is just == instead of := and everything works. Try this:
p1 = {p1x, p1y, p1z}; (*tell it that p1,p2,p3 are vectors*)
p2 = {p2x, p2y, p2z}; (*center of circle ctr=f p1+g p2+(1-f-g)p3*)
p3 = {p3x, p3y, p3z}; (*keep the center in the plane of p1,p2,p3*)
ctr =f p1 + g p2 + (1 - f - g) p3;
eq1 = (ctr - p1).(ctr - p1) - (ctr - p2).(ctr - p2) == 0;
eq2 = (ctr - p1).(ctr - p1) - (ctr - p3).(ctr - p3) == 0;
Solve[{eq1, eq2}, {f, g}]
But the returned result is very long.
Nave fun, Alexei
Alexei BOULBITCH, Dr., habil.
IEE S.A.
ZAE Weiergewan,
11, rue Edmond Reuter,
L-5326 Contern, LUXEMBOURG
Office phone : +352-2454-2566
Office fax: +352-2454-3566
mobile phone: +49 151 52 40 66 44
e-mail: alexei.boulbitch@iee.lu
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar
Re: A simple Solve gives me errors Alexei Boulbitch <Alexei.Boulbitch@iee.lu> - 2014-04-24 08:03 +0000
csiph-web