Maths - Grad - code to plot fields


On this page we discuss how the plots fields, on this page, were produced.

To produce the results the program needs to have an XML input code. Here I have listed this input code for the vector diagram with the arrows:

<classDef>
<mathTypeHypercomplex name="do" type="complex" />
<varDef name="a" mathName="do" />
<outputObj fileName="plot3.obj" description="mass3" gridWidth="300" gridHeight="200"
marginLeft="20" marginBottom="20" marginRight="10" marginTop="10"
xAxisPos0="100" xAxisPos1="200" yAxisPos0="100" yAxisPos1="200"
graphMax="100" graphStep="1" graphMultipier="0.1" >
<variable name="a" />
<unaryOp type="inverseSquare">
<binaryOp type="add">
<variable name="a" />
<constant value="3,0" />
</binaryOp>
</unaryOp>
</outputObj>
<outputObj fileName="plot4.obj" description="mass4" gridWidth="300" gridHeight="200"
marginLeft="20" marginBottom="20" marginRight="10" marginTop="10"
xAxisPos0="100" xAxisPos1="200" yAxisPos0="100" yAxisPos1="200"
graphMax="100" graphStep="1" graphMultipier="0.1" >
<variable name="a" />
<unaryOp type="inverseSquare">
<binaryOp type="add">
<variable name="a" />
<constant value="-3,0" />
</binaryOp>
</unaryOp>
</outputObj>
<outputObj fileName="plot5.obj" description="mass5" gridWidth="300" gridHeight="200"
marginLeft="20" marginBottom="20" marginRight="10" marginTop="10"
xAxisPos0="100" xAxisPos1="200" yAxisPos0="100" yAxisPos1="200"
graphMax="100" graphStep="1" graphMultipier="0.1" >
<variable name="a" />
<binaryOp type="add">
<unaryOp type="inverseSquare">
<binaryOp type="add">
<variable name="a" />
<constant value="3,0" />
</binaryOp>
</unaryOp>
<unaryOp type="inverseSquare">
<binaryOp type="add">
<variable name="a" />
<constant value="-3,0" />
</binaryOp>
</unaryOp>
</binaryOp>
</outputObj>
</classDef>

This code produced a 3D .OBJ file which I then tweeked and rendered using blender as explaned on this page.

back to original page.


metadata block
see also:

Vectors

Correspondence about this page

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

 

cover Div, Grad, Curl and All That: An Informal Text on Vector Calculus

Other Math Books

Commercial Software Shop

Where I can, I have put links to Amazon for commercial software, not directly related to the software project, but related to the subject being discussed, click on the appropriate country flag to get more details of the software or to buy it from them.

 

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2023 Martin John Baker - All rights reserved - privacy policy.