go to www.geomview.org home page
 
Home

Overview
FAQ
Documentation

Download

Mailing List

Geomview For Windows?

Support
Users
Development

Bug Reporting
Contributing
Contact Us

Sponsors

 

Site Search

 

Advanced
Search

 
About the software@geom archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: geomview



X-Sun-Data-Type: default
X-Sun-Data-Description: default
X-Sun-Data-Name: 4.geoctr.1.txt
X-Sun-Content-Lines: 60

Mathematica 2.2 for SGI
Copyright 1988-93 Wolfram Research, Inc.
 -- X11 windows graphics initialized -- 

In[1]:= Off[General::spell1]

In[2]:= << Geomview.m
 -- Geomview graphics initialized -- 

In[3]:= MakePolygons[vl_List] :=
    Block[{l = vl,
           l1 = Map[RotateLeft, vl],
           mesh},
        mesh = {l, RotateLeft[l], RotateLeft[l1], l1};
        mesh = Map[Drop[#, -1]&, mesh, {1}];
        mesh = Map[Drop[#, -1]&, mesh, {2}];
        Polygon /@ Transpose[ Map[Flatten[#, 1]&, mesh] ]  ]                                                        

In[4]:= u[a_, b_] := .5 (E^(a + I*b) + E^(- a - I*b))

In[5]:= uu[a_, b_] := .5 (E^(a + I*b) - E^(- a - I*b))

In[6]:= z[a_, b_, n_, k_] := E^(k*2*Pi*I/n) * u[a, b]^(2.0/n)

In[7]:= zz[a_, b_, n_, k_] := E^(k*2*Pi*I/n) * uu[a, b]^(2.0/n)

In[8]:= CF[n_:3, alphi_:0.25] :=
Block[{},
alpha=N[Pi alphi];
Do[ 
  Do[ surface[k1+1, k2+1] =
    MakePolygons[Table[
      N[{Re[z[a, b, n, k1]], Re[zz[a, b, n, k2]],
        Cos[alpha] * Im[z[a, b, n, k1]] + Sin[alpha] * Im[zz[ a, b, n, k2]]}],
        {a, -1.0, 1.0, 0.4}, {b, 0, .5 Pi, .1 Pi}]],
          {k2, 0, n - 1}], {k1, 0, n - 1}];
Show[Graphics3D[Table[surface[k1, k2], {k1, 1, n}, {k2, 1, n}]], Boxed->False] ]                                                                                                

In[9]:= CF[3,.25]

Out[9]= -Graphics3D-	(* works fine *)

In[10]:= CF[4,.25]

Out[10]= -Graphics3D-	(* works fine *)

In[11]:= CF[5,.25]

Out[11]= -Graphics3D-	(* does not work: no change in geomview window *)

In[12]:= Live[%]	(* works fine; <<Gl.m would too *)

Out[12]= -Graphics3D-

In[13]:= %11 >> cf.5	(* will work reloaded in Gl.m or Live; won't with Geomview.m *)

In[14]:= !ls -l cf.5
-rw-r--r--   1 jp       user      186768 Aug 16 10:03 cf.5

In[14]:= Quit
----------
X-Sun-Data-Type: default
X-Sun-Data-Description: default
X-Sun-Data-Name: 4.geoctr.3.txt
X-Sun-Content-Lines: 29

matrix={{5,3,-3},{2,4,-5},{-4,2,-3}};
MatrixForm[matrix]
eigs=Eigensystem[matrix]
sol1[t_]=eigs[[2,1]] Exp[eigs[[1,1]] t]
sol2[t_]=t sol1[t]+{a,b,c} Exp[eigs[[1,1]] t]
second=sol2'[t]==matrix.sol2[t]//Cancel
vals=Solve[second]
Clear[x,y,z,t]
sol=DSolve[{x'[t]== 5x[t]+3y[t]-3z[t],
            y'[t]== 2x[t]+4y[t]-5z[t],
	    z'[t]==-4x[t]+2y[t]-3z[t]},
		{x[t],y[t],z[t]},t]
x[t_]=sol[[1,1,2]]
y[t_]=sol[[1,2,2]]
z[t_]=sol[[1,3,2]]
funarray=Table[{x[t],y[t],z[t]} /.
	{C[1]->i,C[2]->j,C[3]->k},
	{i,-2,1},{j,-1,2},{k,-2,2,2}];
tograph=Flatten[funarray,2];
Short[tograph,3]
graphone=ParametricPlot3D[Evaluate[tograph],
	{t,-2,2},
	PlotRange->{{-2,2},{-2,2},{-2,2}}]
<< Graphics`PlotField3D`
graphtwo=PlotVectorField3D[
	{5x+3y-3z,2x+4y-5z,-4x+2y-3z},
	{x,-2,2},{y,-2,2},{z,-2,2},
	VectorHeads->True]
Show[graphone, graphtwo]


 
Home | Overview | FAQ | Documentation | Support | Download | Mailing List
Windows? | Development | Bug Reporting | Contributing | Contact Us | Sponsors
 
site hosted by
SourceForge Logo