1
$\begingroup$

I'm probably being stupid here, but I can't get my points to go in a smooth line:

enter image description here

At this scale they should all equally cover the red line. I must be doing something wrong, anyhow I tried to use Antialiasing to no avail:

c = {{0, 0}, {1, 1.332}};
linePts = Table[{1, 1.332} i, {i, 0, 1, 0.01}];
Style[Graphics[{Blue, Point@c, Red, Style[Line[c], Antialiasing -> True], Black, PointSize[Small], 
   Style[Point[linePts], Antialiasing -> True]}, Axes -> True, 
  PlotRange -> All, AspectRatio -> 1, ImageSize -> 800], 
 Antialiasing -> True]

Another example of this: a judder is apparent if you move t slowly:

f = BSplineFunction[{{0, 0}, {1, 1}}, SplineDegree -> 1];
Manipulate[
 Style[Graphics[{PointSize[0.05], Point[f[t]]}, AspectRatio -> 1, 
   ImageSize -> {300., 300.}, BaseStyle -> Opacity[0.999], 
   Frame -> True,
   PlotRange -> {{0, 1}, {0, 1}},
   PlotRangePadding -> Scaled[.05]], Antialiasing -> True], {t, 0, 1, 
  0.0001}]
$\endgroup$
3
  • 2
    $\begingroup$ This may be related. $\endgroup$ May 27, 2016 at 2:41
  • $\begingroup$ Your Mathematica version and OS? How did you create the raster image at the top of your post? (Screen capture, Save Selection As..., etc.) $\endgroup$
    – Mr.Wizard
    May 27, 2016 at 4:22
  • $\begingroup$ OSX 10.10.5, MMA 10.4.1 $\endgroup$
    – M.R.
    May 27, 2016 at 5:07

1 Answer 1

2
$\begingroup$

As far I can tell your problems are due to rasterization that you introduced into your graphics output. You need to tell us how you made the enlarged image of the small part of your output that you show us, because if you were to let Mathematica plot from exact numbers and do the magnification, the graphics look great, even when no Antialiasing -> True options are given.

c = {{0, 0}, {1, 4/3}};
linePts = Table[c[[2]] i, {i, 0, 1, 1/100}];
Magnify[
  Graphics[
    {Red, Line[c],
     {Blue, PointSize[Medium], Point[c]},
     Black, PointSize[Small], Point[linePts]},
     PlotRange -> All,
     Axes -> True], 
  8]

Here is a small section of the displayed image.

image

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.