Re: Draw3D ColorFunction->Hue
- To: mathgroup at smc.vnet.net
- Subject: [mg60393] Re: Draw3D ColorFunction->Hue
- From: Janwillem van Dijk <xyz.van.dijk at hccnet.nl>
- Date: Thu, 15 Sep 2005 05:16:14 -0400 (EDT)
- References: <dg8kp3$qr9$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Thanks, that works! David Park wrote: > Janwillem, > > The problem is only that you have to turn off the Lighting in the > Draw3DItems statement. > > Needs["DrawGraphics`DrawingMaster`"] > > fsize = 14; > tstyle = {FontFamily -> "Helvetica", FontSize -> fsize, > FontWeight -> "Bold"}; > muConcrete = 2.3*0.05; > LConcrete = 10; > FConcrete = 0.14; > lConcrete = 10; > RnCorrection = 1 - F (L/lambda)Cosh[x/lambda]/Sinh[L/lambda] // FullSimplify > f = RnCorrection /. {mu -> muConcrete, L -> LConcrete, F -> FConcrete}; > > Draw3DItems[ > {Draw3D[f, {lambda, 5, 15}, {x, -LConcrete, LConcrete}, > ColorFunction -> (Hue[0.75*(1 - #)] &)], > {Text[ > "Correction factor", {5, -10, 0.85}, {-.6, 0}, {0, 1}, > TextStyle -> tstyle]}}, > Lighting -> False, > Axes -> Automatic, > AxesLabel -> {"Path length (cm)", "Depth (cm)", ""}, > BoxRatios -> {1, 1, 0.7}, > TextStyle -> tstyle, > ImageSize -> 500]; > > Or, if you want the lighting on to obtain a little shading you can convert > the Hue specifications to SurfaceColor specifications and use > NeutralLighting. > > Draw3DItems[ > {Draw3D[f, {lambda, 5, 15}, {x, -LConcrete, LConcrete}, > ColorFunction -> (Hue[0.75*(1 - #)] &)] /. > Hue[h_] :> SurfaceColor[Hue[h]], > {Text[ > "Correction factor", {5, -10, 0.85}, {-.6, 0}, {0, 1}, > TextStyle -> tstyle]}}, > NeutralLighting[0.3, 0.5, 0.1], > Axes -> Automatic, > AxesLabel -> {"Path length (cm)", "Depth (cm)", ""}, > BoxRatios -> {1, 1, 0.7}, > TextStyle -> tstyle, > ImageSize -> 500]; > > Hope that helps. > > David Park > djmp at earthlink.net > http://home.earthlink.net/~djmp/ > > > > > From: Janwillem [mailto:j.vandijk at xyz-nl.com.nijmegen.internl.net] To: mathgroup at smc.vnet.net > > > I want to make a 3D surface plot of which the colour changes depending > on the z-value over the full hue-range. With just Plot3D this works. > However, I want the z-axis legend vertical and therefore thought of > using David Park's package using Draw3D and Draw3DItems. This however > refuses to take ColorFunction as an option. > > 1) Is there a solution for this colouring problem? > 2) How do I get the z-label to the left of the plot and still have the > box along the plot-axes? > > Thanks for the help > Janwillem > > > <<Graphics`Graphics` > <<Graphics`Graphics3D` > <<DrawGraphics`DrawingMaster` > fsize=14; > tstyle={FontFamily\[Rule]"Helvetica",FontSize\[Rule]fsize, > FontWeight\[Rule]"Bold"}; > muConcrete=2.3*0.05; > LConcrete=10; > FConcrete=0.14; > lConcrete=10; > RnCorrection=1-F (L/lambda)Cosh[x/lambda]/Sinh[L/lambda]//FullSimplify > f=RnCorrection/.{mu->muConcrete,L->LConcrete,F\[Rule]FConcrete}; > p3d=Plot3D[f,{lambda,5,15},{x,-LConcrete,LConcrete}, > ColorFunction\[Rule](Hue[0.75*(1-#)]&), > AxesLabel\[Rule]{"Path length (cm)","Depth (cm)","Correction > factor"}, > BoxRatios\[Rule]{1,1,0.7},TextStyle->tstyle,ImageSize\[Rule]500]; > pl=Draw3D[f,{lambda,5,15},{x,-LConcrete,LConcrete}]; > Draw3DItems[{pl,{Text["Correction factor",{5,-10,0.85},{-.6,0},{0,1}, > TextStyle\[Rule]tstyle]}},Axes\[Rule]Automatic, > AxesLabel\[Rule]{"Path length (cm)","Depth (cm)",""}, > BoxRatios\[Rule]{1,1,0.7},TextStyle->tstyle,ImageSize\[Rule]500] > >