Skip to main content
edited tags
Link
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Source Link

For printed color image I've used approach introduced by Szabolcs in antialiasing3DSzabolcs in antialiasing3D.

For printed color image I've used approach introduced by Szabolcs in antialiasing3D.

For printed color image I've used approach introduced by Szabolcs in antialiasing3D.

added 1 character in body
Source Link
Kuba
  • 137.7k
  • 13
  • 289
  • 751
DynamicModule[{a, b, c, n, type, fig, controls, print},
 Deploy@Dynamic[Refresh[
    Panel@Grid[{{fig, controls}}, Spacings -> 2],
    None]],
 
 Initialization :> (
   type = 1;
   n = 100000;
   {a, b, c} = {{1.4, -2.3}, {2.4, -2.1}, {2.41, 1.64}};
   
   controls = Column[{
      Slider2D[Dynamic@a, {-Pi, Pi, .01}], Dynamic@a,
      Slider2D[Dynamic@b, {-Pi, Pi, .01}], Dynamic@b,
      Slider2D[Dynamic@c, {-Pi, Pi, .01}], Dynamic@c,
      Button["Print", print[], Method -> "Queued"] }];
   
   fig = Graphics[{White, AbsolutePointSize@1, 
      Dynamic[
       Point@fr2[{.0, .0, .0}, ControlActive[2 10^4, 10^5], a, b, c][[;;c][[All , ;; 2]]]
      }, ImageSize -> {1, 1} 500, Background -> Black, AspectRatio -> Automatic];
   
   print[] := With[{t = 3, pointsize = 1, pts = 10^5, res = 72},
     Composition[
       CreateDocument,
       ImageResize[Rasterize[#, "Image", ImageResolution -> t res], Scaled[1/t]] &,
       Graphics[{AbsolutePointSize@pointsize, 
          Riffle[Hue@Rescale[#, {-2, 2}, {0, 1}] & /@ #[[;; , 3]], 
             Point /@ #[[;; , ;; 2]]] &@#
          }, ImageSize -> 800, Background -> Black] &
       ][fr2[{.0, .0, .0}, pts, a, b, c]]];
   )]
DynamicModule[{a, b, c, n, type, fig, controls, print},
 Deploy@Dynamic[Refresh[
    Panel@Grid[{{fig, controls}}, Spacings -> 2],
    None]],
 
 Initialization :> (
   type = 1;
   n = 100000;
   {a, b, c} = {{1.4, -2.3}, {2.4, -2.1}, {2.41, 1.64}};
   
   controls = Column[{
      Slider2D[Dynamic@a, {-Pi, Pi, .01}], Dynamic@a,
      Slider2D[Dynamic@b, {-Pi, Pi, .01}], Dynamic@b,
      Slider2D[Dynamic@c, {-Pi, Pi, .01}], Dynamic@c,
      Button["Print", print[], Method -> "Queued"] }];
   
   fig = Graphics[{White, AbsolutePointSize@1, 
      Dynamic[
       Point@fr2[{.0, .0, .0}, ControlActive[2 10^4, 10^5], a, b, c][[;; , ;; 2]]]
      }, ImageSize -> {1, 1} 500, Background -> Black, AspectRatio -> Automatic];
   
   print[] := With[{t = 3, pointsize = 1, pts = 10^5, res = 72},
     Composition[
       CreateDocument,
       ImageResize[Rasterize[#, "Image", ImageResolution -> t res], Scaled[1/t]] &,
       Graphics[{AbsolutePointSize@pointsize, 
          Riffle[Hue@Rescale[#, {-2, 2}, {0, 1}] & /@ #[[;; , 3]], 
             Point /@ #[[;; , ;; 2]]] &@#
          }, ImageSize -> 800, Background -> Black] &
       ][fr2[{.0, .0, .0}, pts, a, b, c]]];
   )]
DynamicModule[{a, b, c, n, type, fig, controls, print},
 Deploy@Dynamic[Refresh[
    Panel@Grid[{{fig, controls}}, Spacings -> 2],
    None]],
 
 Initialization :> (
   type = 1;
   n = 100000;
   {a, b, c} = {{1.4, -2.3}, {2.4, -2.1}, {2.41, 1.64}};
   
   controls = Column[{
      Slider2D[Dynamic@a, {-Pi, Pi, .01}], Dynamic@a,
      Slider2D[Dynamic@b, {-Pi, Pi, .01}], Dynamic@b,
      Slider2D[Dynamic@c, {-Pi, Pi, .01}], Dynamic@c,
      Button["Print", print[], Method -> "Queued"] }];
   
   fig = Graphics[{White, AbsolutePointSize@1, 
      Dynamic[
       Point@fr2[{.0, .0, .0}, ControlActive[2 10^4, 10^5], a, b, c][[All , ;; 2]]]
      }, ImageSize -> {1, 1} 500, Background -> Black, AspectRatio -> Automatic];
   
   print[] := With[{t = 3, pointsize = 1, pts = 10^5, res = 72},
     Composition[
       CreateDocument,
       ImageResize[Rasterize[#, "Image", ImageResolution -> t res], Scaled[1/t]] &,
       Graphics[{AbsolutePointSize@pointsize, 
          Riffle[Hue@Rescale[#, {-2, 2}, {0, 1}] & /@ #[[;; , 3]], 
             Point /@ #[[;; , ;; 2]]] &@#
          }, ImageSize -> 800, Background -> Black] &
       ][fr2[{.0, .0, .0}, pts, a, b, c]]];
   )]
Tweeted twitter.com/#!/StackMma/status/478167629463842816
Source Link
Kuba
  • 137.7k
  • 13
  • 289
  • 751
Loading