File:X sin(y) Surface Plot.png

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(800 × 648 pixels, file size: 146 KB, MIME type: image/png)

Captions

Captions

Add a one-line explanation of what this file represents
Description Plot of x sin(y)
Date
Source self-made
 
This diagram was created with Mathematica.
Author Inductiveload
Permission
(Reusing this file)
Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
In some countries this may not be legally possible; if so:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.
Mathematical Function Plot
Description Plot of x sin(y)
Equation
Co-ordinate System Cartesian
X Range 0 .. 1
Y Range -0 .. 2π

Mathematica Code

[edit]
This uses Chris Hill's antialiasing code to average pixels and produce a less jagged image. The original code can be found here.
gr = Plot3D[x  Sin[y],
    {x, 0, 1},
    {y, 0, 2Pi},
    ImageSize -> 800,
    AxesLabel -> {x, y, z},
    TextStyle -> {FontSize -> 60},
    BoxStyle -> {AbsoluteThickness[4]},
    MeshStyle -> {AbsoluteThickness[4]}]

aa[gr_] := Module[{siz, kersiz, ker, dat, as, ave, is, ar},
    is = ImageSize /. Options[gr, ImageSize];
    ar = AspectRatio /. Options[gr, AspectRatio];
    If[! NumberQ[is], is = 288];
    kersiz = 4;
    img = 
    ImportString[ExportString[gr, "PNG", ImageSize -> (is kersiz)], "PNG"];
    siz = Reverse@Dimensions[img[[1, 1]]][[{1, 2}]];
    ker = Table[N[1/kersiz^2], {kersiz}, {kersiz}];
    dat = N[img[[1, 1]]];
    as = Dimensions[dat];
    ave = Partition[Transpose[Flatten[
          ListConvolve[ker, dat[[All, All, #]]]] & /@ 
            Range[as[[3]]]], as[[2]] - kersiz + 1];
    ave = Take[
    ave, Sequence @@ ({1, Dimensions[ave][[#]], kersiz} & /@ \
Range[Length[Dimensions[ave]] - 1])];
    Show[Graphics[Raster[
      ave, {{0, 0},
         siz/kersiz}, {0, 255}, ColorFunction -> RGBColor]], PlotRange -> \
{{0, siz[[1]]/kersiz}, {0, siz[[2]]/kersiz}}, ImageSize -> is, 
    AspectRatio -> ar]
    ]

aa[gr]

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current14:12, 26 August 2007Thumbnail for version as of 14:12, 26 August 2007800 × 648 (146 KB)Inductiveload (talk | contribs){{Information |Description= |Source=self-made |Date= |Author= Inductiveload }} {| class=prettytable !colspan=2|Image:Icon Mathematical Plot.svg Mathematical Function Plot |- !Description |Plot of x sin(y) |- !Equation |<ma

The following page uses this file:

File usage on other wikis

The following other wikis use this file: