Skip to content

Instantly share code, notes, and snippets.

@amaizacatalan
Created April 27, 2019 10:04
Show Gist options
  • Save amaizacatalan/4ec75c1c058f7b3ee0f6e3bb7eb2ce44 to your computer and use it in GitHub Desktop.
Save amaizacatalan/4ec75c1c058f7b3ee0f6e3bb7eb2ce44 to your computer and use it in GitHub Desktop.
Esferas irregulares con Maxima
/* Representación de una esfera irregular con Maxima*/
/* Tomando las expresiones de J. Stewart Cálculo: conceptos y contextos */
n:5$
m:6$
/*Definimos la superificie esférica usando las coordenadas esféricas*/
rho:1+0.2*sin(m*theta)*sin(n*phi)$
load(draw)$
/* Definimos el dominio y el tipo de coordenadas para su gráfica */
irr_sphere: spherical(rho,theta,0,2*%pi,phi,0,%pi)$
/* Dibujamos la superfice sin colorear*/
draw3d(surface_hide=true,
color=blue,
irr_sphere,
nticks=400,
title="Esfera irregular. m=6,n=5")$
/* Dibujamos la superficie con una paleta de tonos grises*/
draw3d(surface_hide=false,
enhanced3d = [1+0.2*sin(m*theta)*sin(n*phi),theta,phi],
nticks=400,irr_sphere,
palette=gray,
title="Esfera irregular. m=6,n=5")$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment