MathGroup Archive 2006

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

Search the Archive

RE: Drawing outline of 3D shape

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67646] RE: [mg67628] Drawing outline of 3D shape
  • From: "David Park" <djmp at earthlink.net>
  • Date: Mon, 3 Jul 2006 06:38:07 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Mark,

With DrawGraphics, from my web site, I would do it as follows:

Needs["DrawGraphics`DrawingMaster`"]

sphere[r_, t_, p_] := r{Cos[p]Sin[t], Sin[p]Sin[t], Cos[t]}

The following draws the outline around the equator and an upper half great
circle going through the North pole. I got that by drawing half of the
equator and then rotating it with the RotateShape routine.

Draw3DItems[
    {ParametricDraw3D[sphere[1, Pi/2, p], {p, 0, 2Pi}],
      ParametricDraw3D[sphere[1, Pi/2, p], {p, Pi, 2Pi}] //
        UseRotateShape[0, Pi/2, Pi/2]},
    Boxed -> False
    ];

The following is a variation where the equatorial plane is drawn as a solid
surface and a single upper arc is drawn in a light gray and the grid lines
faintly indicated.

Draw3DItems[
    {SurfaceColor[Gainsboro], EdgeForm[ColorMix[Gainsboro, Black][0.2]],
      ParametricDraw3D[sphere[r, Pi/2, p], {r, 0, 1}, {p, 0, 2Pi},
        PlotPoints -> {5, 32}],
      ParametricDraw3D[sphere[1, Pi/2, p], {p, Pi, 2Pi}] //
        UseRotateShape[0, Pi/2, Pi/2]},
    NeutralLighting[0.3, 0.5, 0],
    Boxed -> False,
    Background -> Linen
    ];

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/





From: MS [mailto:mark.stankus at gmail.com]
To: mathgroup at smc.vnet.net

Hello,

  Is there a program to draw the outline of a 3D shape.
So a sphere would be drawn as a circle.
A half sphere would be drawn as a arc (where the round
part goes from visible to not visible) and a circle (highlighting
the flat part of the half sphere.

Mark Stankus



  • Prev by Date: sign doubling of a matrix
  • Next by Date: Re: calling maximize recursively
  • Previous by thread: Re: Drawing outline of 3D shape
  • Next by thread: Incomplete Gamma function