MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Constraint visualization

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85816] Re: Constraint visualization
  • From: "Fred Klingener" <gigabitbucket at gmail.com>
  • Date: Sat, 23 Feb 2008 04:26:35 -0500 (EST)
  • References: <fpkvmq$hpm$1@smc.vnet.net>
  • Reply-to: "Fred Klingener" <gigabitbucket at gmail.com>

"NeilJ" <neiljac at gmail.com> wrote in message 
news:fpkvmq$hpm$1 at smc.vnet.net...
> Hallo,
>
> I am brand new to Mathematica. I have acquired the program to assist
> me in constraints/solution space visualization but the results I got
> from my fiddling the past two weeks have been fairly disappointing. (I
> must admit that I've elarnt a lot of wonderful new things but I am
> still unable to carry out my initial objective.)
>
> If I can find out how to color all the faces/edges of the following
> regionplot it will help me a lot.
>
> RegionPlot3D[
> Or[And[And[And[Fm <= 120/(8 - y), 8 - y >= 0],
>    Or[And[Fm <= 69.6/(2.4 + 2 x), x >= 0],
>     And[Fm <= 69.6/(2.4 - 2 x), x <= 0]]],
>   And[Or[And[Fm <= 69.6/(2.4 + 2 x), x >= 0],
>     And[Fm <= 69.6/(2.4 - 2 x), x <= 0]], And[Fm <= 112/y, y > 0]]],
>  And[And[Fm <= 120/(8 - y), y < 0],
>   Or[And[Fm <= 69.6/(2.4 + 2 x), x >= 0],
>    And[Fm <= 69.6/(2.4 - 2 x), x <= 0]]],
>  And[And[Fm <= 112/y, y > 8],
>   Or[And[Fm <= 69.6/(2.4 + 2 x), x >= 0],
>    And[Fm <= 69.6/(2.4 - 2 x), x <= 0]]]], {x, -2.6, 2.6}, {y, -3,
>  9.6}, {Fm, 0, 30}]

Hi Neil,

RegionPlot has a lot of Options to work with. You didn't outline the 
specific effects you're after, but there's a lot of machinery built in. Work 
through the list systematically and keep the parts you like.

It's pretty ambitious for a beginner (or anyone for that matter), but you 
can get to the basics recovering and modifying the GraphicsComplex generated 
by RegionPlot3D. To get a look at the structure, simplify the picture a 
little using something like:

g = RegionPlot3D[---your code here---, Mesh->None, PlotPoints->5, 
Axes->None],

then look at the full structure with

g // InputForm

The Doc Center barely hints at the structure. Basically, the GC consists of 
a list of node positions, followed by lists of graphics primitives that 
reference the parts of the node list. AFAIK, this country is almost 
completely undocumented, but there are a couple of nifty and elegant idioms 
scattered around the Web and Groups for dissecting and modifying the form.

You can extract the GC directly with

graphicsComplex = g[[1]]

Start modifying the GC by hand, displaying the result, 
(Graphics3D[graphicsComplex,Options])noting the result, and generating your 
own documentation.

The procedure may reveal a lot about the inner workings of functions like 
RegionPlot3D, and those revelations may point you in the right direction for 
managing the presentation using the available Options. You can change 
Options and inspect the effects on the GC.

If you're not careful though, it can take over your life.

Hth,
Fred Klingener 



  • Prev by Date: Re: Re: A Use for Interpretation
  • Next by Date: Re: Constraint visualization
  • Previous by thread: Re: Constraint visualization
  • Next by thread: Re: Constraint visualization