Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Surfacecoloring of a sphere

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15809] Re: [mg15747] Surfacecoloring of a sphere
  • From: Jurgen Tischer <jtischer at col2.telecom.com.co>
  • Date: Sun, 7 Feb 1999 02:04:25 -0500 (EST)
  • Organization: Universidad del Valle
  • References: <199902050842.DAA10068@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Florian,

try this example if it's what you are searching for.

gr = SphericalPlot3D[1, {\[Tau], 0, Pi}, {\[Phi], 0, 2 Pi}, 
   PlotPoints -> 100]

(* PlotPoints -> 100 to see no patches in the final Show *)

fu[Polygon[li_List]]:=
  With[{x=Plus@@Drop[li,-1]},{Mod[ArcTan[x[[1]],x[[2]]],2\[Pi]],
      ArcTan[norm[x[[{1,2}]]],x[[3]]]}]

(* fu calculates for a polygon on the sphere rough {long,att} coords.
They go from 0 to 2 Pi and from -Pi/2 to Pi/2. *)

cf[{\[Phi]_,\[Tau]_}]:=Hue[\[Phi] \[Tau]]

(* Replace cf by your color function. *)

fu1[p_Polygon]:={SurfaceColor[cf[fu[p]]],p}

(* fu1 replaces polygons by colored polygons. *)

gr1=fu1/@gr[[1]];

Show[gr1]

If you need something really flashy I recommend POV-Ray
(http://www.povray.org), it's free.

Jurgen

Florian Stock wrote:
> 
> Hello,
> 
> for visualization of an Satellite, i want to color the surface of a
> sphere (for the colors I have a function color[long,att] with long and
> att in a  range from 0 to 2 Pi).
> How can i coloring the sphere?
> I've tried with SphericalPlot3D and the ColorFunction option, with
> ParametricPlot3D, but I didn't found a way to color it.
> 
> Greetings
> 
> Florian
> 
> --
> "Alles was von Bedeutung ist, ist in Mathematik gegruendet.",
>  Robert A. Heinlein`s "Sternenkrieger"



  • Prev by Date: Re: Finding real part (newbie question)
  • Next by Date: Re: BracketingBar for output
  • Previous by thread: Surfacecoloring of a sphere
  • Next by thread: Re: Surfacecoloring of a sphere