Você está na página 1de 12

1Grficosdefunesreaisdeduasvariveis

> load(draw)$

;; loading \#P"Z:/Users/fsmoreir/maxima/binary/5\_37\_3/sbcl/1\_3\_1/share/draw/grcommon.fasl";; loading \#P"Z:/Use

Podemosobterogrficodeumafuno`f:R^2R`atravsde`draw3d`ou`wxdraw3d`

> f(x,y):=x^2y^2$
> wxdraw3d(
dimensions=[500,500],
explicit(f(x,y),x,3,3,y,3,3)
)

(%t3)

(%o3)

dentrode`draw3d`adirectriz`explicit(f(x,y),x,xmin,xmax,y,ymin,ymax)`esboaogrficode`f`nodomnio`[xmin,xmax].
[ymin,ymax]`

Podemosobterumesboogrficomais"sofisticado"utilizando`enhanced3d=true.`

> wxdraw3d(
dimensions=[500,500],
enhanced3d=true,
explicit(f(x,y),x,3,3,y,3,3)
)

(%t4)
(%o4)

Sepretendermosmaiorinteractividade,teremosdeusar`draw3d`paraogrficoaparecernajaneladoGnuPlot.

> draw3d(
dimensions=[500,500],
enhanced3d=true,
explicit(f(x,y),x,3,3,y,3,3)
)$

Sepretendemosdesenharcurvasdenvel`f(x,y)=C`para`Cin{c_1,c_2,...,c_n}`usamosadirectrizcontour_levels`=
{c_1,c_2,...,c_n}`,

> wxdraw3d(
dimensions=[500,500],
enhanced3d=true,

explicit(f(x,y),x,1,1,y,1,1),

contour_levels={1,1/2,1/2,1},
contour=base
)

(%t6)

(%o6)

Comosepodevernaajudadecontour'??contour'temosoutrasformasdedefinirovalorpara'contour'e'contour_levels'.

Graphicoption:contour_levelsDefaultvalue:5Thisgraphicoptioncontrolsthewaycontoursaredrawn.'contour_levels'
canbesettoapositiveintegernumber,alistofthreenumbersoranarbitrarysetofnumbers:

Whenoption'contour_levels'isboundedtopositiveinteger

<n>,<n>contourlineswillbedrawnatequalintervals.Bydefault,fiveequallyspacedcontoursareplotted.

Whenoption'contour_levels'isboundedtoalistoflengththreeoftheform'[lowest,s,highest]',contourlinesareplottedfrom
'lowest'to'highest'instepsof's'.
Whenoption'contour_levels'isboundedtoasetofnumbersoftheform'{n1,n2,...}',contourlinesareplottedatvalues'n1',
'n2',...

Sincethisisaglobalgraphicsoption,itspositioninthescenedescriptiondoesnotmatter.Examples:Tenequallyspaced
contourlines.Theactualnumberoflevelscanbeadjustedtogivesimplelabels.(%i1)load(draw)$(%i2)
draw3d(color=green,explicit(20*exp(x^2y^2)10,x,0,2,y,3,3),contour_levels=10,contour=
both,surface_hide=true)$From8to8instepsof4.(%i1)load(draw)$(%i2)draw3d(color=green,
explicit(20*exp(x^2y^2)10,x,0,2,y,3,3),contour_levels=[8,4,8],contour=both,
surface_hide=true)$Isolinesatlevels7,6,0.8and5.(%i1)load(draw)$(%i2)draw3d(color=green,
explicit(20*exp(x^2y^2)10,x,0,2,y,3,3),contour_levels={7,6,0.8,5},contour=
both,surface_hide=true)$

Graphicoption:contourDefaultvalue:`none'Option'contour'enablestheusertoselectwheretoplotcontourlines.
Possiblevaluesare:

`none':nocontourlinesareplotted.
`base':contourlinesareprojectedonthexyplane.
`surface':contourlinesareplottedonthesurface.
`both':twocontourlinesareplotted:onthexyplaneandonthesurface.

`map':contourlinesareprojectedonthexyplane,andtheviewpointissetjustinthevertical.Sincethisisaglobal
graphicsoption,itspositioninthescenedescriptiondoesnotmatter.Example:(%i1)load(draw)$(%i2)
draw3d(explicit(20*exp(x^2y^2)10,x,0,2,y,3,3),contour_levels=15,contour=both,
surface_hide=true)$

> wxdraw3d(
dimensions=[500,500],
enhanced3d=true,

explicit(f(x,y),x,1,1,y,1,1),

contour_levels={1,1/2,1/2,1},
contour=both
)

(%t7)

(%o7)

> wxdraw3d(
dimensions=[500,500],
enhanced3d=true,
explicit(f(x,y),x,1,1,y,1,1),

contour_levels={1,1/2,1/2,1},
contour=map
)

(%t8)

(%o8)

> wxdraw3d(
dimensions=[500,500],
enhanced3d=true,

explicit(f(x,y),x,1,1,y,1,1),

contour_levels=[1,.2,1],
contour=map
)

(%t9)

(%o9)

2Superfciesdefinidasporumaequaaoem3varieis

Podemostentaresboaroconjuntodepontos`(x,y,z)em[xmin,xmax][ymin,ymax][zmin,zmax]`quesatisfazemaequao
`H(x,y,z)=c`utilizandoocomando`implicit(H(x,y,z)=c,x,xmin,xmax,y,ymin,ymax,z,zmin,zmax)`

> wxdraw3d(
proportional_axes=xyz,
enhanced3d=true,
implicit(x^2+y^2+z^2=1,x,1,1,y,1,1,z,1,1)

(%t10)

(%o10)

> wxdraw3d(
proportional_axes=xyz,
enhanced3d=true,
implicit(x^2y^2=z^2,x,1,1,y,1,1,z,1,1)

(%t11)

(%o11)

3Superfciesparametrizadas

Uconjunto`(x(u,v),y(u,v),z(u,v))`com`uem[umin,umax]``vem[vmin,vmax]`podeseresboadonoMaximarecorrendoa
`parametric_surface(x(u,v),y(u,v),z(u,v),u,umin,umax,v,vmin,vmax)`
> R:1$

x(u,v):=R*cos(u)*cos(v)$
y(u,v):=R*cos(u)*sin(v)$
z(u,v):=R*sin(u)$

esfera:parametric_surface(x(u,v),y(u,v),z(u,v),u,0,2*%pi,v,%pi/2,%pi/2)$

wxdraw3d(

dimensions=[500,500],
proportional_axes=xyz,
enhanced3d=true,
esfera

)

(%t17)

(%o17)

> R:4$r:1$

x(u,v):=(Rr*cos(u))*cos(v)$
y(u,v):=(Rr*cos(u))*sin(v)$
z(u,v):=r*sin(u)$

toro:parametric_surface(x(u,v),y(u,v),z(u,v),u,0,2*%pi,v,0,2*%pi)$

wxdraw3d(
dimensions=[500,500],
proportional_axes=xyz,
enhanced3d=true,
toro
)

(%t24)
(%o24)

> R:4$r:1$

x(u,v):=(Rr*cos(u))*cos(v)$
y(u,v):=(Rr*cos(u))*sin(v)$
z(u,v):=r*sin(u)$

toro:parametric_surface(x(u,v),y(u,v),z(u,v),u,0,2*%pi,v,0,2*%pi)$

wxdraw3d(
dimensions=[500,500],
proportional_axes=xyz,
enhanced3d=true,
esfera,toro
)

(%t31)

(%o31)

Bibliografia:

GraphicswithMAXIMA
(Version5.23andabove)
WilhelmHaager

wilhelm.haager@htlstp.ac.at

November26,http://www.austromath.at/daten/maxima/zusatz/Graphics_with_Maxima.pdf(em2012/04/26)
>

4transparncia

Paraseobtertransparncianumgrficodevemosutilizaraopouser_preamble="setstylefilltransparentsolidvalor_transpar"
emquevalor_transparumvalorentre0(totalmntetransparente)e1(totalmenteopaco)

> wxdraw3d(
dimensions=[500,500],
user_preamble="setstylefilltransparentsolid0.6",
enhanced3d=true,
explicit(x^2+y^2,x,1,1,y,1,1)
)

(%t32)

(%o32)

> wxdraw3d(
dimensions=[500,500],
user_preamble="setstylefilltransparentsolid0.2",
enhanced3d=true,
explicit(x^2+y^2,x,1,1,y,1,1)
)

(%t33)

(%o33)
Pararesultadosmaissatisfat+oriosdeveseusardraw3demvezdewxdraw3d

>

5Coresemgrficos3d

Ocontrolodacoremgr3dpodeserefectuadoatravsdeenhanced3dpalette

> ??enhanced3d

(%o34) false

De3finindopalette=[cor_1,cor_2,...cor_n]aopoenhanced3d=[f(,y,y,z),x,y,z]colocaacorcor_1nospontosdevalor
mnimodefcor_nnospontosdevalormximodefexecutaumainterpolaorecorrendalistradecor_iefunof(x,y,z)
paracolocaracornopixelcorrespondenteaoponto(x,y,z)

> wxdraw3d(dimensions=[500,500],
palette=[red,blue,yellow],
enhanced3d=[z,x,y,z],
explicit(x^2+y^2,x,1,1,y,1,1))$

(%t35)

enhanced3d=[z,x,y,z]equivalenteaenhanced3d=true

> wxdraw3d(
dimensions=[500,500],
palette=[red,blue,yellow],
enhanced3d=true,
explicit(x^2+y^2,x,1,1,y,1,1))$

(%t36)
> wxdraw3d(dimensions=[400,400],
palette=[yellow,red,green,green],
enhanced3d=[z,x,y,z],/*equivatrue*/
explicit(x^2+y^2,x,1,1,y,1,1))$

(%t37)

> wxdraw3d(dimensions=[400,400],
palette=[yellow,red,green,green],
enhanced3d=[x,x,y,z],
explicit(x^2+y^2,x,1,1,y,1,1))$

(%t38)

> wxdraw3d(dimensions=[400,400],
palette=[blue,white,blue,white,blue,white,blue,white],
enhanced3d=[x,x,y,z],
explicit(x^2+y^2,x,3,3,y,3,3))$

(%t39)

> wxdraw3d(
dimensions=[500,500],
palette=["#bd2c29","#ffd35a","white"],
colorbox=false,
enhanced3d=[x,x,y,z],
explicit(x^2+y^2,x,1,1,y,1,1))$

(%t40)

> wxdraw3d(
dimensions=[500,500],
palette=["#bd2c29","#ffd35a","white"],
wired_surface=true,
enhanced3d=[x,x,y,z],
explicit(x^2+y^2,x,1,1,y,1,1))$

(%t41)
>

CreatedwithwxMaxima.