Questions on the construction of 2D and 3D graphics through the direct use of primitives, directives, and functions. Include the graphics3d tag for questions specifically on 3D graphics. This tag is not to be used for basic questions on visualizing functions and lists using the various flavors of ...

learn more… | top users | synonyms

93
votes
3answers
12k views

How to create word clouds?

Word clouds are rather useless fancy and visually appealing plots, where words are plotted with different sizes according to their frequency in a corpus. Many applications exist out there (Wordle, ...
89
votes
7answers
14k views

How to generate a random snowflake

'Tis the season... And it's about time I posed my first question on Mathematica Stack Exchange. So, here's an holiday quest for you Graphics (and P-Chem?) gurus. What is your best code for generating ...
71
votes
2answers
5k views

How to manipulate 2D plots?

When it comes to visual analysis, large datasets or data with intricate internal details often makes plotting in 2D useless, as the outcome is either just a fraction of the full dataset, or no details ...
61
votes
6answers
6k views

Generating visually pleasing circle packs

EDIT: I want to thank you all guys for this unexpected intellectual and artistic journey. Hope you enjoyed as I did. I would like to generate a circle pack that ...
60
votes
8answers
12k views

How to make an inkblot?

How to effectively create a polygon that looks like a realistic inkblot? So far, I could come up with this (borrowing from Ed Pegg Jr.'s Rorschach demonstration): ...
57
votes
6answers
9k views

Exporting graphics to PDF - huge file

I want to draw some basic surfaces, export them to PDF and include them in a LaTeX file. I create a simple 3D graphics object, for instance with ...
56
votes
5answers
8k views

$\LaTeX$ and Mathematica

I quite often would like to draw graphics in my $\LaTeX$ documents using Mathematica. I have encountered three problems. I would like to know if there are any workarounds to these problems I would ...
53
votes
2answers
42k views

Cutting bagels into linked halves

I recently came across this video: Mathematically correct breakfast, which shows how a bagel can be neatly sliced into two identical linked halves. I'd like to try this with Mathematica. Here's a ...
49
votes
3answers
4k views

Recovering data points from an image

Unfortunately, some data can only be obtained in picture form (Japanese publications anyone?). Since this cannot be worked with, it has to be converted to a dataset that can; I was wondering whether ...
44
votes
6answers
6k views
44
votes
2answers
2k views

Extract values for ViewMatrix from a Graphics3D

Under More Information in the help page of ViewMatrix the following entry can be found With the setting ...
43
votes
3answers
19k views

How to create new “person curve”?

Wolfram|Alpha has a whole collection¹ of parametric curves that create images of famous people. To see them, enter WolframAlpha["person curve"] into a Mathematica ...
42
votes
1answer
2k views

Implementing a first person view of 3D objects in a scene

I've created the following scene with a Chinese-style building surrounded by trees, and a horse and a rabbit grazing on the grass in Mathematica (don't ask me why there's a bust of Beethoven in ...
41
votes
4answers
2k views

Speeding up this fractal-generating code

I used the code below (which is a sample from this gist containing more similar code) in my answer to my own question about Mandelbrot-like sets for functions other than the simple quadratic on ...
38
votes
9answers
2k views

Animating mathematica.se logo

As we all know our site's logo was completely generated by Mathematica. I suppose it is quite natural to make the next step -- to generate the animated version of this logo. There's a lot of space for ...
38
votes
1answer
1k views

How to construct a treemap using non-rectangles?

I've written the standard version of a tree map (a graphic that shows nested data) and I'm looking to improve on this layout by switching to different types of polygons or perhaps circles. Can anyone ...
37
votes
5answers
4k views

How can this image (optical illusion) be created with Mathematica?

I came across this image the other day: and liked the sensation of it pulsing. I was wondering if anyone would know how to create something similar with Mathematica (without the Pink Floyd Dark ...
37
votes
1answer
1k views

Constructing election cartograms?

I found this pretty neat page showing cartograms for the US elections and I don't really know how to get started doing these graphics in Mathematica. For those who don't know, a cartogram is a map in ...
36
votes
5answers
2k views

Creating ghost trail effects

Does anyone know how to create a ghost trail effect? For a simple example look at this screenshot: You can find the actual animation here. What I would ultimately like to see it happen is to make ...
35
votes
4answers
2k views

Point Renderings Slightly Off in Mathematica

The Mathematica code ...
34
votes
5answers
2k views

Factorisation diagrams

Here is a way to visualize the factorisation of natural numbers. How do we get this or a similar kind of output using Mathematica? See the list of images generated for number from 1 to 36:
34
votes
7answers
3k views

Intersecting graphics

Does the Mathematica graphics system have any concept of intersecting graphics? I've not found much in the documents so far. For example, if I want to show the intersection of two shapes: ...
33
votes
5answers
3k views

Filling a polygon with a pattern of insets

I am trying to fill a shape with diagonal lines. I am aware of Texture, but it rasterizes the fill pattern, which is not desirable. Here was my crack at it: ...
32
votes
7answers
2k views

Character edge finding

The following line of code finds the edge of a character: ...
32
votes
5answers
1k views

Rotating an image along a Möbius strip?

I am trying to make a GIF which will be a rotating Möbius strip, with some text printed along its (one!) side. I am trying to (obviously) do this in Mathematica. After some diligent searching and a ...
31
votes
6answers
5k views

How can I draw the Olympic rings with Mathematica?

How can I draw the 5 interlocking Olympic rings with Mathematica? (SVG version) Edit Hard choice, but some pretty cool answers here. I didn't have 3D answers in mind when I posted the question ...
31
votes
5answers
4k views

How can I extract data points from a black and white image?

Consider the following graph (source): Is there any way to extract the data points from this image in a semi-automatic way? I have seen, and tried the methods suggested in this question, but they ...
31
votes
2answers
964 views

How can I add drop shadows and specular highlights to 2D graphics?

I thought I'd share some code in the form of a self-answered question, but other answers are of course welcome. Drop shadows are a familiar visual effect, giving the impression of a graphical element ...
30
votes
1answer
1k views

How can all those tiny polygons generated by RegionPlot be joined into a single FilledCurve?

RegionPlot will usually generate a large number of tiny polygons for filling the region: ...
29
votes
5answers
6k views

Custom arrow shaft

Inspired by Sjoerd C. de Vries' nice answer to this question, and the desire to pimp a Graph I did with Mathematica recently I would like to know if there are ways to customize the arrow's shaft ...
28
votes
3answers
2k views

Extract current viewing parameters from a 3D view?

Is there a way to find out the current viewing parameters of a 3D view? What often happens is that I create a view, for example: ...
28
votes
3answers
2k views

Antialiasing in 3D

Is it possible? Is it platform specific? Does it rely on the graphics hardware? Why does the antialiasing slider under Preferences > Appearance > Graphics do nothing? I remember seeing some ...
27
votes
5answers
3k views

How to plot Venn diagrams with Mathematica?

How does one plot Venn diagrams with Mathematica? I've searched quite a bit and I've found one source at MathWorld which provides the source code for doing them. But I don't understand this code, can ...
27
votes
2answers
1k views

Mollweide maps in Mathematica

Context In my field of research, many people use the following package: healpix (for Hierarchical Equal Area isoLatitude Pixelization) which has been ported to a few different languages (F90, C,C++, ...
27
votes
3answers
669 views

How can I make points “glow”?

I have a set of points in the plane which I would like to have "glow". I would like for each point to glow individually and I would also like some increase in the intensity corresponding to an ...
27
votes
2answers
1k views

Animating a Voronoi Diagram

edit: Excellent answers have been provided and I made an animation which is suitable for my use, however, all the examples rely on bitmap/rasterized data; is there a vector based approach? I would ...
26
votes
6answers
2k views

Extruding along a path

I'm trying to render a 3D image of a path by extruding a circular cross-section along the path, creating a "snake-like" path. Here is an image I found to illustrate: I can't seem to figure out if ...
26
votes
5answers
1k views

Create magnified call-out loupe effect on image

I'm trying to create a Mathematica Manipulate that generates a graphical call-out using a 'loupe'-style or magnifying glass enlarger - a possible solution is shown ...
26
votes
3answers
4k views

ListPlot with each point a different color and a legend bar

I would like to generate a ListPlot with the color for each point in the plot corresponding to a particular value (not associated with the position in the plot). I'd then like to add a legend ...
26
votes
2answers
501 views

Undocumented form for FilledCurve[]

New in Mathematica 8 is FilledCurve (and its cousin JoinedCurve). The docs state that this function can take a list of segments ...
26
votes
2answers
378 views

Chart illustrating options that affect Graphics/Graphics3D objects

In Mathematica there is a seemingly never-ending list of parameters that affect the appearance of Graphics and Graphics3D ...
26
votes
1answer
331 views

Is there a way to access the (lexically) current colour inside Graphics?

Note that this is not a duplicate of the question over there. That one asks for a given point, while I'm asking about the lexical structure (which, of course, is not directly related to any point in ...
26
votes
3answers
782 views

Consistent Plot Styles across multiple MMA files and data sets

I am starting to write a thesis for which I want to use MMA for all my plotting needs, mostly because a lot of the basic analysis has been done there. To ensure that I am applying styles consistently ...
25
votes
4answers
2k views

How to create this four-dimensional cube animation?

This is a tesseract, a four-dimensional cube, which contains two cubes. Here, each side length of the smaller one is 1, while the side length of the bigger one is 2. How do make I it? I am still ...
25
votes
3answers
2k views

Creating a 2D meshing algorithm in Mathematica

As what is proving to be a difficult, but entertaining task, I am attempting to adapt a 2D meshing algorithm created for MATLAB and port it to Mathematica. I understand meshing functions already exist ...
25
votes
2answers
856 views

Aligning plot axes in a graphics object

I need to align the y-axes in the plots below. I think I'm going to have to do some rasterizing and searching for vertical lines, then vary x and ...
25
votes
1answer
797 views

Make a map of squares

I'm trying to use Mathematica to make a map similar to the one here i.e. a US map where each state is represented by a square of a given size, located as close as possible to its true geographical ...
24
votes
4answers
488 views

Creating new graphics primitive (EdgeForm, FaceForm)

My question is strongly related to this question, nevertheless I would like to bring it to every ones attention. Lets say I want to create a new graphics primitive ...
24
votes
3answers
2k views

Avoiding white lines inside filled area in RegionPlot exported as PDF or PS

When doing a RegionPlotand then exporting (or saving from the front end) as PDF or EPS, there are small white lines in the filling of the region. Here's an example ...
24
votes
1answer
376 views

Tool to locate bloat in a notebook?

In developing a notebook, I often find I have created a very boated file that takes a long time to save. I would like to slim it down. It is usually the result of graphics and images, but they may be ...