Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #7862
| From | James Stein <mathgroup@stein.org> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Works in 7.0.1, not in 8.0.4 ?? |
| Date | 2012-01-16 11:54 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jf1354$5hg$1@smc.vnet.net> (permalink) |
I wrote some code in 2010 (posted below).
It gave correct results under Mathematica v7.0.1 (posted further below)
It gives nothing except errors under Mathematica v8.0.4 (as shown still
further below).
Can anyone shed light on this discrepancy?
The same file was run on both versions, immediately after a Quit[] command.
(Both Mathematica versions were Macintosh.)
Code:
Clear[xp,yp,zp];(* pole coordinates *)
Clear[xs,ys,zs];(* sphere coordinates *)
Clear[xm,ym,zm];(* map coordinates *)
eq0=xs^2+ys^2+zs^2==1; (* sphere *)
(* constraints on colinear points,x,y,z: *)
eq1=(ym-yp) (xs-xp)==(xm-xp) (ys-yp);
eq2=(ym-yp) (zs-zp)==(zm-zp) (ys-yp);
(* two sets polar projection parameters *)
eq3={xp,yp,zp,zm}=={0,0,-1,0};(* N *)
eq4={xp,yp,zp,zm}=={0,0,+1,0};(* S *)
(* map from S -> M *)
Simplify[Solve[{eq1,eq2,eq3},{xm,ym}]]
Simplify[Solve[{eq1,eq2,eq4},{xm,ym}]]
(* map from M -> S *)
Simplify[Solve[{eq0,eq1,eq2,eq3},{xs,ys,zs}]][[2]]
(* m2s (S): *)
Simplify[Solve[{eq0,eq1,eq2,eq4},{xs,ys,zs}]][[2]]
Output from v7.0.1: (printed nicely, but can't display in email)
{{xm->xs/(1+zs),ym->ys/(1+zs)}}
{{xm -> -(xs/(-1 + zs)), ym -> -(ys/(-1 + zs))}}
{xs->(2 xm)/(1+xm^2+ym^2),zs->-1+2/(1+xm^2+ym^2),ys->(2 ym)/(1+xm^2+ym^2)}
{xs -> (2 xm)/(1 + xm^2 + ym^2), zs -> 1 - 2/(1 + xm^2 + ym^2),
ys -> (2 ym)/(1 + xm^2 + ym^2)}
Output from v8.0.4:
{}
{}
Part::partw: Part 2 of {} does not exist. >>
{}[[2]]
Part::partw: Part 2 of {} does not exist. >>
{}[[2]]
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Works in 7.0.1, not in 8.0.4 ?? James Stein <mathgroup@stein.org> - 2012-01-16 11:54 +0000
csiph-web