Re: ParametricPlot3D from 5.2 to 6.0

*To*: mathgroup at smc.vnet.net*Subject*: [mg80566] Re: ParametricPlot3D from 5.2 to 6.0*From*: Roger Bagula <rlbagula at sbcglobal.net>*Date*: Sun, 26 Aug 2007 03:05:51 -0400 (EDT)*References*: <fagtvh$91l$1@smc.vnet.net>

Francois LE COAT wrote: >Hi, > >With the following notebook <http://eureka.atari.org/vrml/etoile.nb> >I had the following rendering <http://eureka.atari.org/vrml/etoilm.gif> >using Mathematica v. <= 5.2. With Mathematica 6.0 the interpolation >method order seems to have changed. I didn't managed to obtain a similar >rendering with the "star" 3D surface. > >Can someone help to find how to describe the "star" the same way again ? > >Thanks by advanced. > >Regards, > >-- >Fran=E7ois LE COAT >Author of Eureka 2.12 (2D Graph Describer, 3D Modeller) ><http://eureka.atari.org/> ><http://fon.gs/eureka/> > > > I like the effect the Max has of speeding up the output. This code works in 5.x Mathematica here: ( I don't have 6.0: I doubt iy will run on my older operating system ) xmin := 0 xmax := 2*Pi ymin := 0 ymax := Pi ro[t_, p_] := Max[(1 - 3*Sin[n*p]*Cos[5*t]), 0] xxx[t_, p_] := ro[t, p]*Sin[p]*Cos[t] yyy[t_, p_] := ro[t, p]*Sin[p]*Sin[t] zzz[t_, p_] := ro[t, p]*Cos[p] Table[ParametricPlot3D[{yyy[t, p], -xxx[t, p], zzz[t, p]}, {t, xmin, xmax}, { p, ymin, ymax}, PlotPoints -> { 100, 50}, Axes -> False, Boxed -> False, PlotRange -> All], {n, 1, 5}] FullSimplify[ExpandAll[xxx[t, p]^2 + yyy[t, p]^2 + zzz[t, p]^2]] Coming from the FullSimplify: Cos[5*t]=Sin[5*t+Pi/2] Your "star" like output is a "fake" as these are "rose" like parametrics. Code for a "true" star-like parametric from : http://local.wasp.uwa.edu.au/~pbourke/surfaces_curves/barthdecic/index.html Clear[x, y, z, p, a] a = 1; p = (1 + Sqrt[5])/2; x = r*Sin[p0]*Cos[t]; y = r*Sin[p0]*Sin[t]; z = r*Cos[p0]; implicit = ExpandAll[8 (x^2 - p^4 y^2) (y^2 - p^4 z^2) (z^2 - p^4 x^2) (x^4 + y^4 + z^4 - 2 x^2 y^2 - 2 x^2 z^2 - 2 y^2 z^2) + a (3 + 5 p) (x^2 + y^2 + z^2 - a)^2*(x^2 + y^2 + z^2 - (2 - p) a)^2]; Clear[p0, t]; (* flat radial version*) Table[Plot3D[-Re[r] /. Solve[implicit == 0 , r][[n]], {p0, 0, Pi}, {t, 0, 2* Pi}], {n, 1, 10}]; (* projection onto sphere as radial*) Clear[ro, xxx, yyy, zzx] xmin := 0 xmax := 2*Pi ymin := 0 ymax := Pi ro[t_, p0_] := -Re[r] /. Solve[implicit == 0 , r][[n]] xxx[t_, p0_] := ro[t, p0]*Sin[p0]*Cos[t] yyy[t_, p0_] := ro[t, p0]*Sin[p0]*Sin[t] zzz[t_, p0_] := ro[t, p0]*Cos[p0] Table[ParametricPlot3D[{yyy[t, p0], xxx[t, p0], zzz[t, p0]}, {t, xmin, xmax}, {p0, ymin, ymax}, PlotPoints -> {40, 20}, PlotRange -> All], {n, 1, 10}] It is kind of "clunky" and doesn't work very well, but it is a better "real" star than yours apparently. Roger Bagula