MathGroup Archive 2005

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

Search the Archive

Re: Re: How smooth graphs?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61448] Re: [mg61419] Re: [mg61385] How smooth graphs?
  • From: Chris Chiasson <chris.chiasson at gmail.com>
  • Date: Wed, 19 Oct 2005 02:16:53 -0400 (EDT)
  • References: <200510170629.CAA16338@smc.vnet.net> <4353C88B.1000001@wolfram.com> <200510180645.CAA11310@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Um, export all the frames as high resolution gifs to a temporary
directory. Use the batch photo processing capabilities of your
favorite image editor to resize (perhaps with bi-cubic interpolation)
all the gifs. Use the same program to create an animated gif.

You could also do the same with png -> mng, but I don't think many
programs can play an mng. Also, your graph does not have many colors,
so gifs would work well.

One last thought. You could probably come up with a numeric function
of two variables that represents your solution. If you could figure
out to incorporate that into an animated swf (Flash) or svg, that
would be exceptionally cool and you should tell us how you did it :]


On 10/18/05, Murray Eisenberg <murray at math.umass.edu> wrote:
> The antialiasing treatment you suggest does make the curve appear
> smoother, even with no user option for PlotPoints or PlotDivision.
>
> Unfortunately, it also eliminates the deliberately thickened size of the
> curve.  And it wipes out the axes labels and tick labels!  I suppose
> some aa treatment of just the curve itself would at least take care of
> the latter.
>
> The aa function is REALLY slow -- too slow to even consider using it for
> a totally live generation of the animation (although the author of the
> code I presented may be satisfied with generating the graphics ahead of
> time).
>
> I'll pass your suggestions along.  Thanks.
>
> Jeff Bryant wrote:
> >   The effect you are seeing is aliasing.  This has nothing to do with
> > the PlotPoints, it is is a rendering effect.  Basically, you need to
> > apply a "smoothing filter" to the pixels, or anti-alias the graphic, so
> > you don't get the stairstep effect.  Mathematica does not automatically
> > antialias graphics, but you can write top level code to do it for you.
> > You can see some example code here:
> >
> > http://members.wri.com/jeffb/visualization/aa.shtml
> >
> > If you decide to apply this technique, I strongly recommend that you
> > drastically reduce the PlotPoints setting since I'm pretty sure they
> > don't need to be very high. ....
> >
>   > -Jeff
> >
> > Murray Eisenberg wrote:
> >
> >> A colleague, L.J. Moffitt, asked me how the graphs produced by the
> >> following code might be smoothed so as to avoid the jaggedness,
> >> especially the "staircasing".
> >>
> >> (This is going to be projected, and at a typical projection resolution
> >> of 1024 x 768, it looks even worse.)
> >>
> >> I tried all sorts of ploys, like drastically increasing PlotPoints and
> >> PlotDivision; lowering the Thickness in PlotStyle; and even breaking
> >> up the domain into two subintervals, one where the graph is more level
> >> and the other where the graph is rising rapidly.  Nothing seemed to help.
> >>
> >>   p[x_, L_] := (50.*L)/((1000. - 1.*x)*(-9.025*^8 + L + 1000.*x^2))
> >>
> >>   <<Graphics`Animation`
> >>
> >>   Animate[
> >>     Plot[p[x,L],{x, 0, 950},
> >>        PlotStyle->{AbsoluteThickness[3]},
> >>        PlotRange->{.1,.7},
> >>        AxesLabel->{"Inspection Rate","Robustness"},
> >>        PlotPoints->10000, PlotDivision->50,
> >>        AxesStyle->{RGBColor[0,0,1],Thickness[0.02]},
> >>        ImageSize->600,
> >>        Background->RGBColor[.1,.2,.7]],
> >>    {L,1000000000., 1000000000.+700000000., 10000000}]
> >>
> >> Any suggestions that I might pass along to him?
> >>
> >
>
> --
> Murray Eisenberg                     murray at math.umass.edu
> Mathematics & Statistics Dept.
> Lederle Graduate Research Tower      phone 413 549-1020 (H)
> University of Massachusetts                413 545-2859 (W)
> 710 North Pleasant Street            fax   413 545-1801
> Amherst, MA 01003-9305
>
>


--
Chris Chiasson
http://chrischiasson.com/contact/chris_chiasson


  • Prev by Date: Re: Language vs. Library why it matters / Turing
  • Next by Date: Re: Getting a pure text widget?
  • Previous by thread: Re: How smooth graphs?
  • Next by thread: Re: How smooth graphs?