Tag Info

Hot answers tagged

33

This problem is probably due to the MathematicaMono font which is introduced in v10. Defining the problem: Some fonts ("[","_","]","=", etc.) are rendered badly with strange thinning in v10 in some notebook magnifications. This is obvious when you compare the renderings from v10 with those from v9. Analyzing the problem: I found that all of these ...


19

The relevant line from this SO post: fontlist = FE`Evaluate[FEPrivate`GetPopupList["MenuListFonts"]]; Update: The content of the "MenuListFonts" list is system-dependent. In Windows Vista, I get a list that contains only FontFamily: Panel@Row[fontlist[[;; 60]] /. Rule[x_, y_] :> Style[ToString@x, 14, FontFamily -> y], " \[FilledSquare] "] On ...


17

Unfortunately I haven't seen this question earlier so my two cent to this problem may be a bit late. Please take my words with the appropriate suspicion because I have no knowledge of the internal implementation. My explanations are purely based on observation and what I think happens here. Let's first make clear that we all agree on what we are seeing. The ...


14

Something like this perhaps: model = ExampleData[{"Geometry3D", "StanfordBunny"}]; region = BoundaryDiscretizeGraphics[model]; Rasterize @ RegionPlot3D[region, ColorFunction -> (Glow[GrayLevel[#3]] &), ViewPoint -> {0, 0, 10}, Background -> Black, Boxed -> False, Lighting -> None]


12

Mathematica is not really a reference in digital terrain models, and, there are very powerful software packages to deal with geographical information. But... where would be the fun... If the information in the files includes a digital terrain model (DTM), with the surface of the terrain defined by triangular faces (regular or not), then you can easily ...


12

Mostly the same as @SimonWoods, but it runs on V9: data = ExampleData[{"Geometry3D", "StanfordBunny"}, "VertexData"]; ListSurfacePlot3D[data, MaxPlotPoints -> 50, ColorFunction -> (Glow[GrayLevel[#3]] &), Mesh -> None, Background -> Black, Boxed -> False, ViewPoint -> {0, 0, 10}, Axes -> False]


12

I have to admit, that I only copied your code and tried it without actually reading what you have done, but I guess I can help to fix at least the second image. What you are after is the "DepthPeelingLayers" settings that you can access with the option inspector: When you raise this number to e.g. 32, the output looks like this This can also be done ...


10

In spirit of djp's answer: one can put a point lighting source at the camera position to distinguish distances to spheres. With the option Lighting -> {{"Point", White, ImageScaled@{0, 0, 0}, {0, 0, 5}}} I obtain


6

I analyzed which fonts are loaded when starting Mma v10 compared to v9. The problem could be tracked down to the loading of the fonts in the Folder $InstallationDirectory\SystemFiles\Fonts\TrueType If you open Mathematica-Bold.ttf or MathematicaMono-Bold.ttf, you will see how ugly these are. To prevent loading these fonts one should make a backup copy of ...


5

Show the spheres together with a black semi-opaque bitmap. It gives "fog", but not blur. spheres = Table[Sphere[ RandomVariate[UniformDistribution[{0.2, 0.8}], 3], .01], {100}]; cube = {{{RGBColor[0, 0, 0, 0.07]}}}; c = Image3D[cube]; s = Graphics3D[spheres, Background -> Black, ImageSize -> Large]; Show[s, c] It gives distance, but not ...


5

How about something Image3D-based? grid = First@ ParametricPlot3D[{Cos[u] Cos[v], Sin[u] Cos[v], Sin[v]}, {u, 0, 2 Pi}, {v, -Pi/2, Pi/2}, PlotStyle -> None]; Graphics3D[ {grid, {Red, Thick, Line[1.2 {{-1, 0, 0}, {1, 0, 0}}]}, {Blue, Thick, Line[1.2 {{0, -1, 0}, {0, 1, 0}}]}, {Green, Thick, Line[1.2 {{0, 0, -1}, {0, 0, 1}}]}, ...


5

You just need to change the parameters before and after your Sphere[] like this: {Graphics3D[{Opacity[0.6], GrayLevel[1], Sphere[], GrayLevel[0], Opacity[1.0], globeGrid[6, figure]}]} Opacity[0.6] is about right to partly hide the lines around the back. GrayLevel[1] because you want the sphere to be coloured white/light. GrayLevel[0] because you want ...


5

Here is my solution using RevolutionPlot3D to draw the disk layers, it's faster; First convert the image to data rows: imgd = Map[First[#] &, ImageData[ColorConvert[img, "Grayscale"]], {2}]; rows = Reverse /@ Transpose[imgd]; Define the function to draw the disk slices: ClearAll[disk] disk[row_List, nPoints_] := Module[{ lr = Length[row]}, ...


5

Although exporting x3d format maintains the light sources and exports the mesh, it isn't perfect when used with Blender (the only 3D editor I tried). However, since it's the best solution I have, I wrote some brief instructions for that procedure. It's important to note that I used Blender version 2.60 and Mathematica 9. Since the instructions are almost ...


5

I would be happy if I could get Mathematica to prefix each POV-Ray export (which Mathematica supports, by the way) with a preamble in which I specify camera, lighting, etc. But unfortunately I don't know to what extent it's possible to customize Mathematica's export facilities. Use ExportString for obtaining the output file as a String inside of ...


4

Im sorry i have a bit limited time at the moment so the answer will need to be revisited later. While its true that the hardware of your computer could do this, and it could be included in by wolfram making shadows is usually considered a next step in rendering. I am not dwelling on why this doesn't work, as you can use any of the existing free raytracers ...


4

Based on experimentation with Mathematica 8.04 on Windows 7 64-bit: I don't think it's possible to do anything in the kernel. When you rasterize a Graphics expression it is processed by System`ConvertersDump`ConvertGraphicToRasterDataPacket which assembles an ExportPacket and sends it to the front end. The front end returns a System`ConvertersDump`Bitmap ...


4

The ability of adjusting the viewpoint and position of a model before obtaining its depth-map is necessary in most cases. By adopting the answers provided by the nice guys here, I obtained an alternative method in which the viewpoint and position of the model can be adjusted right before producing its depth-map. And function DiscretizeGraphics was used ...


3

Fixed in 10.0.2 . On windows 7, 64 bits Graphics3D[{CapForm["Butt"], Tube[{{0, 0, 0}, {1000, 0, 0}}, 30], Tube[{{0, 300, 0}, {1000, 300, 0}, {1000, 300, 100}}, 30]}, Boxed -> False, PlotRange -> All]


3

I don't know how much you have worked with POVRay, but there is no need to generate thousands of individual pov files. For animations you can use the built-in clock function. Include in the graphics primitives exported by Mathematica a dependence on the clock, and let POVRay do the work for you. The following is a very simple example of POVRay code which ...


3

Here you can find some software to convert Mathematica graphics for input into POVray (untested and rather old, though) http://www.mathconsult.ch/showroom/pubs/MathProg/htmls/2-11.htm Edit Maeder's book and files aren't available for online downloading (you've to purchase the book) Edit Or perhaps you can find them at the link provided in the commen Edit ...


3

Problem 1 should be a distribution specific bug. I cannot reproduce this problem on Archlinux. I can reproduce problem 2. I think primusrun is still experimental. You may report a bug to them (but the developers may not have Mathemataica though).


3

Here's a variation to help with different points of view. data = ExampleData[{"Geometry3D", "StanfordBunny"}, "VertexData"]; viewPoint = {-1, -1, -1}; {min, max} = {Min@#, Max@#} &@(EuclideanDistance[#, viewPoint] & /@ data) ListSurfacePlot3D[data, MaxPlotPoints -> 50, ViewPoint -> viewPoint, ColorFunction -> (Glow[GrayLevel[ (max - ...


2

After talking with Wolfram tech support, it seems problem 1 is really just this issue resolved by running Mathematica by the mathematica -mesa command. Problem 2 is unresolved. I suppose I should keep this question open, though I don't know if a fix will come soon.


2

Here is an example of a function drawn along a parametric path: points = {{0, 0}, {1, 1}, {1.8, 1.8}, {2, 2}, {3, 3/2}, {4, 1}}; path = BSplineFunction[points]; ipath = Interpolation[ Transpose@({Prepend[Accumulate[Norm /@ Differences@#], 0], #} &@ Table[path@x, {x, 0, 1, .01}])]; plen = ipath[[1, 1, 2]]; d2 = Derivative[1]@ipath; ...


2

You could try something like this Animate[ Graphics[{ Black, Rectangle[{0, 0}, {120, 100}], EdgeForm[{Thick, GrayLevel[0.6]}], GrayLevel[0.3], Triangle[{{110, 10}, {10, 10}, {60, 90}}], EdgeForm[None], GrayLevel[0.8], Polygon[{{0, 30}, {0, 35}, {35, 50}, {31, 43}}], Inset[ Plot[.0025 t Sin[c .25 t], {t, 0, 100}, Axes -> False, ...


2

You can export just the image to EPS by allowing rasterisation with the "AllowRasterization" option in Export. Export["testdata1.eps",t1,"AllowRasterization"->True] Hope this helps.


1

You must adjust the Antialiasing Quality to solve that issue. Go to menu Edit -> Preferences -> Appearance -> Graphics.. then adjust it.. That worked for me. I have Ubuntu 14.04 and Mathematica V9. Other solution is open a terminal and run: mathematica -mesa when opening.


1

Thanks to Rahul Narain for pointing out my oversight, and thanks to Timothy Wofford for his suggestion. Here, I revised my code as below. I still keep on using the function DiscretizeGraphics because I can't get rid of the ugly boundaries produced by ListSurfacePlot3D. Code for viewpoint & position adjustment: model = Import["c:\\turtle.obj"]; vp = ...


1

I have the same memory issue as you do. Try Compress/Uncompress with Animate: exampleFrames = Table[DensityPlot[ Evaluate[Exp[-((x - Cos[t])^2 + (y - Sin[t])^2)/.025]], {x, -1.5, 1.5}, {y, -1.5, 1.5}, ColorFunction -> GrayLevel, PlotRange -> All, PlotPoints -> 30, Frame -> None, PlotRangePadding -> None], {t, Pi/50, 2 Pi, ...



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