logo back up home forward   further reading more topics »

Maths - Program - config script

I have called this a config script to distinguish it from the python script that the program is written in.

It is an XML file with the following tags:

BAG

This is the overall tag that encloses the whole program.

<BAG> version

Constants

label for whole config:

<Label>

entry for each user parameter:

<UserPara> Name,Value,Index

Each user parameter has a name and value. index values for file are generated automatically.

Coordinates

These tags defines a coordinate grid and camera information

<Coords> min,max,zero,line

<Offset> x,y,z

<CamPos> x,y,z

<CamDir> x,y,z

Parameters

These are global parameters that apply to all surfaces

<Reference>

<complex> in,out

<ParU> Min,Max

<ParV> Min,Max

Surface

Each surface has a surface definition.

<Surface> m1,m2,m3,m4

<fn1>
<fn2>
<fn3>

fn1,fn2 and fn3 are the functions, fn1 being the x value, fn2 being the y value and fn3 being the z value.

m1,m2,m3 and m4 are indexes to the material definitions, m1 & m2 are the materials for real values, m3 and m4 are the materials for imaginary values.

Material

There are as many material definitions as required. They are referenced from the surface tag by the index number, the first one is 4, the next one is 5 and so on (0 to 3 are reserved)

<Material> Wireframe,Smooth,alpha,emit,glow

<matCol> r,g,b

material colour

Example:

<BAG version="0.0.1">
<Reference>Cartesian</Reference>
<Coords min="-5.0" max="5.0" zero="-5.0" line="0.00999999977648" />
<Offset x="0.0" y="0.0" z="-5.0" />
<CamPos x="5.0" y="5.0" z="3.0" />
<CamDir x="-2.3900001049" y="2.96000003815" z="-1.11000001431" />
<Label>
multiply
</Label>
<complex in="0" out="1" />
<ParU Min="-2.0" Max="2.0">
16
</ParU>
<ParV Min="-2.0" Max="2.0">
24
</ParV>
<Surface m1="4" m2="5" m3="6" m4="7">
<fn1>
u
</fn1>
<fn2>
v
</fn2>
<fn3>
sqrt(u*u-v*v)
</fn3>
</Surface>
<Material Wireframe="0" Smooth="1" alpha="0.899999976158" emit="0.20000000298" glow="0.0">
<matCol r="0.5" g="0.0" b="0.0" />
</Material>
<Material Wireframe="1" Smooth="0" alpha="0.9" emit="0.2" glow="0.2">
<matCol r="0.0" g="0.0" b="0.0" />
</Material>
<Material Wireframe="0" Smooth="1" alpha="0.899999976158" emit="0.20000000298" glow="0.0">
<matCol r="0.0" g="0.5" b="0.0" />
</Material>
<Material Wireframe="1" Smooth="0" alpha="0.9" emit="0.4" glow="0.3">
<matCol r="0.0" g="0.0" b="0.0" />
</Material>
</BAG>

metadata block
see also:

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.

 

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.

 

Can you help?

Please send me any improvements to here. I would appreciate ideas to make the pages more useful including error correction, ideas for new pages, improvements to wording. It helps if you quote the full URL of the page.

 

progam

I am working on a project which uses these principles, if you would like to help me with this you are welcome to join in, here:

http://sourceforge.net/projects/mjbworld/

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

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