Tag Info

Hot answers tagged

13

I'm going to describe the workflow with the aid of an example. In this example, my aim is to produce an accurate and beautiful ray traced image of Richmond's minimal surface (the variation with five "petals"). I want to include Mathematica's parameter grid lines and visually emphasize the surface's boundary. See here for a description of Richmond's surface: ...


13

I sometimes use Pov-Ray to render quantum mechanical wave function data, and I wrote a very basic package that exports simple Mathematica plots and call povray to render the graphics, and then imports it into the notebook. In this way, I can render better looking graphics without leaving Mathematica. Moreover, since the graphics are rendered outside ...


8

I don't see the advantage of using Mathematica to Export a *.pov file at all. I always (try to) export POVRay *.inc include files that are self-contained and require no editing. For Step 3, Mathematica v10.0.2, stores the triangles in triangles = richmond[[1, 2, 1, 1, 6, 1, 1, 1]] For Step 3, I would avoid editing by writing the following Export. ...


6

In Mathematica version 10 you can directly plot over regions. regularPolygon[nbrSides_Integer?(# > 2 &), scale_: 1] := Polygon[scale {Cos[#], Sin[#]} & /@ (2 Pi*Range[1/nbrSides, 1, 1/nbrSides])] Manipulate[ plot[func, Element[{x, y}, regularPolygon[n]], AspectRatio -> Automatic], {{func, x^2 + y^2, "Function"}, {x^2 + y^2, Sin[x] ...


6

Here's one way. I'm going to use the contourRegionPlot3D function from here. I include the function definition here for convenience: contourRegionPlot3D[region_, {x_, x0_, x1_}, {y_, y0_, y1_}, {z_, z0_, z1_}, opts : OptionsPattern[]] := Module[{reg, preds}, reg = LogicalExpand[region && x0 <= x <= x1 && y0 <= y <= y1 ...


6

This is a repost of Wolfram Community answer Let's start from your code: cub1 = Cuboid[{0, 0, 0}, {20, 2, 20}]; cub2 = Cuboid[{12, 0, 8}, {17, 2, 17}]; Graphics3D[{cub1, cub2}]; reg = DiscretizeRegion[RegionDifference[cub1, cub2]] You have a lot of tetrahedrons: MeshCells[reg, 3] // Length 10093 And a lot of polygons: MeshCells[reg, 2] // ...


5

Perhaps Lighting -> {{"Ambient", White}? Show[ PolyhedronData["Icosahedron"] /. Polygon[p_] :> MapIndexed[{Hue[Mod[3*First[#2], 20]/20], Polygon[#1]} &, p], Lighting -> {{"Ambient", White}} ]


3

Using @MichaelE2's example, a combination of Glow and Lighting->None produces a similar picture: Show[PolyhedronData["Icosahedron"] /. Polygon[p_] :> MapIndexed[{Glow[Hue[Mod[3*First[#2], 20]/20]], Polygon[#1]} &, p], Lighting -> None] Alternatively: A surface can be specified as having an absolute color col by giving the ...


2

if you need the plot only in hexagonal boundaries the RegionFunction option of Plot3D would be helpful R = 1; f = Interpolation[ Table[{a, R {Cos[a], Sin[a]}}, {a, -\[Pi], \[Pi], \[Pi]/3}], InterpolationOrder -> 1]; then look what we obtained ParametricPlot[f[a], {a, -\[Pi], \[Pi]}] then we may plot some function with boundaries inside ...


2

Using a Graphics3D object from that file (4th object down from the top of slide 8) (which I'm calling p) we can reconstruct your graphic as follows: z = Union@ Cases[p[[1]], {x_Real, y_Real, z_Real} :> {{x, y}, z}, {0, \[Infinity]}]; d2 = DiscretizeGraphics@ Graphics@ Replace[p[[1]], {x_Real, y_Real, z_Real} :> {x, y}, {0, ...


1

Tak a closer look at documentation: data = RandomReal[1, {100, 2}]; Histogram3D[data, {{.2}, {.5}}] The following bin specifications bpsec can be given: {w} use bins of width w (...) {xspec,yspec} give different x and y specifications ergo: {{wx}, {wy}}



Only top voted, non community-wiki answers of a minimum length are eligible