## can you color a certain part of a 2d plot, for ins...

Dear community,

I'm new to maple and was wondering if you could help me out.

I have this curve where I want to make a line that goes from x=0.5 up to its value on the curve in this case 1.60 and then all the way to the y-axis so there is an area under the curve which I can color if that's even possible?

I have the following in maple:

k := 2.5;
2.5
Ca0 := 1;
1
v := 20;
20
Ca := Ca0*(1-x);
1 - x
Fa0 := Ca0*v;
20
Cb := Ca0*x;
x
ra := k*Ca*Cb;
2.5 (1 - x) x
plot(1/ra, x = 0 .. 1);

Best Regards

## How to shade area between 3 functions and define a...

I tryed this, because i thought i might be abel to shade this new piecewise function later on, but i dont know how to tell maple that there is 2 y-axes values in the interval from (2;3):

so it failed.

pleace help regards Niklas.

## how to fill the upper region in plot3?...

Dear all,

Is there any way to fill the upper region in plot3d?

e.g. if I put the filled option in

plot3d(y^3+x^2, x = 0 .. 1, y = -1 .. 1, filled)

then the region between the x-y plane and my plot will be filled. What if I want to fill the upper region?

The reason is that I want to show the upper region is acceptable for me, but I couldn't find any other way.

If you have any solutions for me, I appreciate it.

## Why does the polygon's color overflow its boundari...

In a post of April 15, 2013 by Kitonum, the procedure named Picture accepts a list of polygon segments, creates a plot of these as a 2D polygon's boundaries and fills the polygon with a color.

The code below attempts to modify Picture to produce a 3D filled polygon in a plane parallel to the xy plane.

When invoked by the code below the procedure, the filling color conforms to the straight line boundaries but overflows the curved, parabolic boundary. How can this be corrected?

Picture:=proc(L, C, N::posint:=100, Boundary::list:=[linestyle=1])

local i, var, var1, var2,e, e1, e2,e3, P, h ;

global Q,Border;

for i to nops(L) do

#` set P`[i] = list of points for each segment.

#` for a segment defined as a list of points, P[i] = the segment's definition`

#` for a curve definition, approximate it with a list of [x,y] points of its function evaluated at N even intervals in its

# range`

if type(L[i],listlist(algebraic))  then P[i]:=op(L[i]);   else

#` for curve def'n, set var = def'n and h= `(variable range)/(2)

var:=lhs(L[i,2]);  var1:=lhs(rhs(L[i,2]));  var2:= rhs(rhs(L[i,2])); h:=(var2-var1)/(N);

#` for function def'n, set e=function`

if type(L[i,1], algebraic) then  e:=L[i,1];

#` for polar function r=f(t) create N values of the [cos*r,sin*r] i.e. the equivalent [x,y] values for r valued at N even

# divisions of its range`

if nops(L[i])=3 then P[i]:=seq(subs(var=var1+h*i,[e*cos(var), e*sin(var)]), i=0..N);  else

#` for non-polar function y=f(x) create N values of [x,y] for x values at N even divisions of its range`

P[i]:=seq([var1+h*i, subs(var=var1+h*i,e)], i=0..N)  fi;  else

#` for parametric function [f`(t),g(t)] create N values of [f(t),g(t)] for t values at N even divisions of its range.

e1:=L[i,1,1];  e2:=L[i,1,2];

#` P`[i]:=seq(subs(var=var1+i*h,[e1, e2]), i=0..N):

P[i]:=seq([subs(var=var1+i*h,e1), subs(var=var1+i*h,e2),0], i=0..N) fi; fi; od;  #`  MODIFIED FOR 3 D `[f(t), g(t), 0]

Q:=[seq(P[i], i=1..nops(L))];

Border:=plottools[curve]([op(Q), Q[1]],  op(Boundary));

#` the shaded figure is a polygon whose vertices are Q, whose interior color is C`

#` return a list of the polygon and its border`

[plottools[polygon](Q, C),  Border];

end proc:

L := [[[0, 0, 0], [0, 1, 0]], [[x, x^2+1, 0], x = 0 .. 2], [[2, 5, 0], [2, 2, 0]], [[x, x, 0], x = 2 .. 0]]:

plots[display](Picture(L, color = yellow), axes = normal, scaling = constrained)

## Solid Surface under a curve....

Hi,

I want to draw a solid that lies under z=4+x^2-y^2 and the base is bounded by -1<=x<=1 and 0<=y<=2.

I tried the following, but does not look nice. The plane x=1 is outside of the surface boundary. I also used the range as -1<=x<=1.01, otherwise I can't see the plane.

Thanks for helping.

## Plotting using 'filled' between parallel lines wit...

Good day,

I have plotted a family of lines in one graph, and now I want to shade an area between two horizontal (parallel) lines, for example 2 and 5.
So what I did was to use the command 'filled'. First I shaded the area in vertical direction from 0 to 2 white. After that I filled the area in vertical direction from 0 to 5 for example blue.
This results in a shaded area between 2 and 5 in the color blue, what I like to have.

Question: Is there a way (a command) to fill an area between two horizontal lines more easily? So that I shade it between 2 and 5 in just one commandline. Now I first make a part white, and then the next 'layer' behind is in the color I'd like to have.

Another thing is that when I shade an area in the color white, my gridlines disappear! Is there a way to avoid this?

I have found information about shading area between two intersecting lines (can be done relatively easy), but between two horizontal (parallel) lines I still can't find a simpler way to do it.

Somebody got a suggestion?

Greetings,
Frank

## Plotting a filled semicircle rotated across one ax...

I can't solve probably very easy problem. How to plot a filled semicircle which is rotated across one axis by an angle alpha? I came to the solution which I don't consider as the best one (since e.g. it will not work for alpha=Pi/2*(odd integer)) and I believe someone of you will show me a better approach. Thank you in advance.

My solution:

`alpha := (1/6)*Pi:plot3d([x, y, y*tan(alpha)], x = -1 .. 1, y = 0 .. sqrt(1-x^2)*cos(alpha), axes = normal, labels = ["x", "y", "z"...`

## plotting region between two functions...

Suppose that I wanted to produce a 2D plot which was coloured in the region between two functions.

I mean not just between two curves, but between two functions. I would like to make the curves appear as smooth as Maple knows how, but without getting any jaggedness due to using a high grid in an implicitpot.

Consider this example. These two curves are displayed as being quite smooth (using adaptive plotting or whatever `plot` knows to use). How best can the regions between these two curves be filled, without having to recourse perhaps to a rough implicit plot?

```plot([x^2-1, -x-1], x=-1.5..1.5, y=-1.5..1.5, color=black);
```

A simple trick with a product provides a defined implicit region that `implicitplot` can handle. But there can be small gaps, or irregularities, because the formulas for the curves are being solved in a complicated way and no longer being used as mere functions.

```plots:-implicitplot( (y - (x^2-1))*(y - (-x-1)),
x=-1.5..1.5, y=-1.5..1.5,
filledregions=true, gridrefine=4,
coloring=[COLOUR(RGB,.8,.8,.9),"white"],
axes=boxed, labels=["x","y"],
view=[-1.5..1.5,-1.5..1.5] );
```

Another technique is to overlay two simpler implicit plots, colouring and layering them carefully so as to give the impression that only the inner regions had been coloured. The problem here is that the intersections all have to be computed and the problem split up piecemeal (which I did not do) so that the layered colouring is adjusted to whichever curve lies on top. Without that care, then something like this happens, with odd subregions appearing uncoloured.

```plots:-display(
plots:-implicitplot( x^2-1 >= y, x=-1.5..1.5, y=-1.5..1.5,
filledregions=true, gridrefine=4,
coloring=["white","white"] ),
plots:-implicitplot( -x-1 >= y, x=-1.5..1.5, y=-1.5..1.5,
filledregions=true, gridrefine=2,
coloring=[COLOUR(RGB,.8,.8,.9),"white"] ),
axes=boxed, labels=["x","y"], view=[-1.5..1.5,-1.5..1.5]);
```

Did I miss something obvious? Is there some other calling sequence or command that makes this much easier (and smoother, by default)?

## Draw a triangle filled with specific color in geom...

I am trying to draw a triangle with black lines and fill it in gray. Based on the maple help code i am trying this code:

draw(T, thickness = 3, filled = [color = "Blue"])

It does draw the triangle T with the right thickness, but the triangle isn't filled. Any thoughts?

help appreciated

Pieter

## Maple 14 enhancement to plot option 'filled'

by:

Christopher2222's recent post reminded me of a new plot feature that inadvertently (and through my own fault) got left out of the new-features help pages. The 'filled' option now takes a true/false value or a list of suboptions. The suboptions apply to the polygons that make up the filled region under the curve.

plot(x^2, x=0..1, color="NavyBlue", thickness=3, filled=[color="Blue", transparency=0.7]);

 Page 1 of 1
﻿