Group Abstract Group Abstract

Message Boards Message Boards

[GIF] Gerontocracy (circular slices of a triangle)

Overlapping circle arcs forming a triangle

Gerontocracy

I'm extremely interested in using slices of an object to implicitly reconstruct the object itself. Of course, this is most obviously useful for high-dimensional objects, but it can also lead to some interesting visualizations of low-dimensional objects. Here are a couple of examples.

Taking circle arc slices of an equilateral triangle isn't particularly interesting mathematically, but it still gives an interesting visual effect.

Here's the code:

cols = RGBColor /@ {"#118DF0", "#ECECDA", "#FF304F", "#0E2F56"}

Module[{polygonvertices, n},
 polygonvertices = {{0, 0}, {1, 0}, {1/2, Sqrt[3]/2}};
 n = 25;
 Manipulate[
  Graphics[{Thickness[.02], CapForm["Round"], 
    Flatten[Table[{cols[[i]], 
       Circle[polygonvertices[[i]], 
        r, {\[Pi] *2 (i - 1)/3, \[Pi] (2 i - 1)/3}]}, {r, s, 1.02, 
       1/n}, {i, 1, 3}], 1], EdgeForm[None], cols[[4]], 
    Polygon[{{3/2, 5}, {3/2, Sqrt[3]/2}, {1/2, Sqrt[3]/2}, {0, 
       0}, {-5, 0}, {-5, 5}}], 
    Polygon[{{1/2, 5}, {1/2, Sqrt[3]/2}, {1, 0}, {5, 0}}], 
    Polygon[{{0, 0}, {0, 1}, {-5, 1}, {-5, -5}, {5, -5}, {5, 1}, {1, 
       1}, {1, 0}}]}, 
   PlotRange -> {{-.1, 1.1}, {-0.16698729810778068`, 
      1.0330127018922193`}}, Background -> cols[[4]], 
   ImageSize -> 540], {s, 0., 1/n}]
 ]

(The stupid Polygon objects are to blank out the region outside the triangle. As already mentioned, I would be very happy to learn a better way to approximate the functionality of RegionFunction in a Graphics object.)

6 Replies

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: EDITORIAL BOARD
Posted 10 years ago
POSTED BY: Erik Mahieu

This is beautiful, @Clayton Shonkwiler, thank you for sharing! In Graphics3D we have ClipPlanes to cut away portions of a 3D scene from the resulting view. You are right, in 2D (and 3D) we have RegionFunction but then you need to use Plot / Plot3D etc. - plotting functions. On the other hand I think Show and Overlay can combine objects with transparency holes. So you can create a template in a Plot-ing function (via RegionFunction), leading design in Graphics, and then block parts of the design with the template using Show or Overlay. Not sure how practical this is, just dwelling on ideas. Perhaps this might be of use too:

Filling a polygon with a pattern of insets

POSTED BY: Vitaliy Kaurov

I've already advocated a few times for a ClippingMask function, like illustrator/gimp/photoshop has. I think Mathematica really should have it. It probably already has such construct anyhow for the plotting functions.

ClippingMask[object,mask] which shows parts of object (or objects) that are covered by mask. Where mask can be a polygon, region, bspline, rectangle, disk, ellipse, .......

POSTED BY: Sander Huisman
Posted 10 years ago
POSTED BY: Erik Mahieu
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard