Fancy2.mws


contour plot

plot embellishments

more general plotting of dsolve results (Perry's magic)

automated solving of N equations in N unknowns

charge distribution over a wire

rotating mass-spring


The contour plot is a special case of plot3d, which shows contours. Any plot3d graph can be manipulated (oriented) to give contour plots.

The 'view' instruction limits the range of the z-direction, and the 'grid' command gives the grid on which the contour is based.

The 3d view is a manipulated view of the contour plot.


Here is a problem where a 40x40 is set up via a loop and then solved and the results graphed. This problem is one model of how charge accumulates at sharp points, in this case, at the ends of a wire.

This calculates the approximate surface charge on a long thin wire, where the wire radius is small compared to its overall length.

It determines the charges on each subsection of the wire (solving N equations in N unknowns), by specifying that the potential on the axis of each hollow cylindrically-shaped element be the same V.

Potential due to a charged section of a cylinder when the ends of the cylinder are located at Z1 and Z2

Find the potential at different segment distances away from a charged segment.

Make a function for the potential of the section at "dist" sections away from the charged section with rho="charge".

Set up 4 equations to find the 4 unknown charges on the 4 sections.

Now do the same problem with more segments in the cylinder.

Use a loop to create the equations.

This loop creates NumSeg equations. In each equation Vs is equated to a sum of items.
This sum is converted (via '+' ) from a sequence of items, created from the Vsec function..


Here is complex problem solved via Lagrange's equations using a numeric version of dsolve. Then some creative functional assignments are made which allow the results to be plotted.

Two equal masses are connected by a spring, and are rotating about their CM.

rotating mass-spring system in Lagrangian formalism, patterned after proj.ms Maple seems to need a lot of shifting around in the variables.

Generalized momenta w/ symbols (pj = dLdqjdot)

The square brackets are important in the following dsolve command to keep the solutions in correct order

magic assignments (Perry worked this out)


End of Fancy2.mws