Tag Info

Hot answers tagged

11

One very clean way to do this is via x3dom, which is a javascript framework for deploying the x3d standard. The library is well supported by modern browsers, and the output is an html file with a supporting archive of x3d files. It is generally very clean and fast, and it does not require any external plugins. The library can be called from the x3dom site or ...


2

This is not a full answer, but it, perhaps, deals with the hardest part: constructing a set of finite lines lying all in one plane, but not intersecting each other. appendLine[list_Symbol] := (list = RandomReal[10, {1, 2, 2}]) appendLine[list_List] := Module[{newline, test = True}, For[newline = RandomReal[10, {2, 2}], test, test = ! ...


2

As in my comment, I feel, it's cleaner to use Show[(Pick[HoldComplete[{regionPlot, contourPlot}], {{True, showQPlane}}])[[1]]] Additionaly I use SetDelayed in the definition of contourPlot to prevent evaluation at definition and HoldComplete makes sure that first Pick is run, and only then what's left is evaluated. [[1]] strips the result of Pick of the ...


2

Here is a quick and somewhat dirty solution. Legended[ Show[PIC1, PIC2, PIC3], SwatchLegend[ {Yellow, Blue, Green}, {"Cos[x] Cos[y]", "-(x-Pi/2) (y+Pi/2)", "(x-Pi/2) (y+Pi/2)"}]]


1

data = {150, 148, 145, 144, 143, 80, -80, -81, -82, -83}; omega = Interpolation[data, InterpolationOrder -> 4]; omegaIntegrate := Integrate[omega[s], s]; Animate[Graphics3D[{Cuboid[{-20, -20, -1.01}, {20, 20, -1}], GeometricTransformation[{Green, Tube[{{0, 0, 0}, {0, 0, 0.15}}, {1.25, 0}], Cylinder[{{0, 0, 0}, {0, 0, 1}}, 1/4], Blue, ...


1

Graphics3D[ Table[ Translate[ Rotate[First@ChemicalData["Water", "MoleculePlot"], RandomReal[{0, \[Pi]}], {8, .5, 0}], {80 i, 160 RandomReal[{-1, 1}], 160 RandomReal[{-1, 1}]}], {i, 1, 20}] ]


1

This is a minimal example of how to do something like this: Manipulate[ plot1 = Graphics3D@Sphere[{0, 0, 0}, 1.3]; If[x, Print@"Calculating plot2"; plot2 = Graphics3D@Cylinder[]]; Show[{plot1, If[x, plot2, {}]}] , {{x, True}, {True, False}} ] Body of the Manipulate is inside Dynamic so if you want to be able to control what is sent to ...



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