Dec 062017

Display 3D parametric surfaces, part of IRIT. C source code. | |||
---|---|---|---|

File Name | File Size | Zip Size | Zip Type |

BLEND.FUN | 224 | 145 | deflated |

CONFIG.C | 9836 | 2790 | deflated |

CONFIG.H | 814 | 364 | deflated |

CTRL-BRK.C | 2952 | 735 | deflated |

CTRL-BRK.H | 863 | 396 | deflated |

DIR-GRAF.C | 5138 | 1578 | deflated |

DIR-GRAF.H | 568 | 271 | deflated |

DRAWFN-D.TC | 1690 | 390 | deflated |

DRAWFN3D.C | 18183 | 4569 | deflated |

DRAWFN3D.CFG | 540 | 333 | deflated |

DRAWFN3D.DOC | 5900 | 2768 | deflated |

DRAWFN3D.HLP | 2921 | 1061 | deflated |

DRAWFN3D.PRJ | 703 | 276 | deflated |

DRAWFN3D.TC | 1690 | 394 | deflated |

DRAWFN3D.XRF | 3998 | 979 | deflated |

EXPR2TRE.C | 48060 | 8404 | deflated |

EXPR2TRG.H | 4154 | 1120 | deflated |

EXPR2TRL.H | 2700 | 861 | deflated |

GENMAT.C | 6739 | 1154 | deflated |

GENMAT.H | 1120 | 339 | deflated |

GETFUNC.C | 11633 | 3208 | deflated |

GLASS.FUN | 573 | 256 | deflated |

GRAPHGEN.C | 39932 | 9408 | deflated |

GRAPHGNG.H | 3722 | 1385 | deflated |

GRAPHGNL.H | 983 | 401 | deflated |

MATHERR.C | 4923 | 1512 | deflated |

MATHERR.H | 854 | 423 | deflated |

MOBIUS.FUN | 168 | 118 | deflated |

MOUSEDRV.C | 14105 | 3775 | deflated |

MOUSEDRV.H | 2161 | 833 | deflated |

PROGRAM.H | 3429 | 1206 | deflated |

SAVEFUNC.C | 17254 | 3974 | deflated |

SETPARAM.C | 6634 | 1629 | deflated |

SHELL.FUN | 179 | 114 | deflated |

SIN-SIN2.FUN | 151 | 101 | deflated |

SINCOS.FUN | 144 | 96 | deflated |

SURF1.FUN | 144 | 95 | deflated |

UPDATE.NEW | 580 | 350 | deflated |

VIEWOBJ.C | 8862 | 2413 | deflated |

VIEWOBJ.H | 1522 | 653 | deflated |

# Download File DRAWFN3S.ZIP Here

## Contents of the DRAWFN3D.DOC file

DRAWFN3D - 3d parametric surfaces drawing program

-------------------------------------------------

BECAUSE DRAWFN3D IS LICENSED FREE OF CHARGE, I PROVIDE ABSOLUTELY NO

WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT WHEN

OTHERWISE STATED IN WRITING, I GERSHON ELBER PROVIDE DRAWFN3D PROGRAM "AS IS"

WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT

NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A

PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE

PROGRAM IS WITH YOU. SHOULD THE DRAWFN3D PROGRAM PROVE DEFECTIVE, YOU ASSUME

THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL GERSHON ELBER,

BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES,

OR OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE

USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR A

FAILURE OF THE PROGRAM TO OPERATE WITH PROGRAMS NOT DISTRIBUTED BY GERSHON

ELBER) THE PROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF

SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.

This program allows drawing of 3D free form explicit algebraic

surfaces of the form: x = X(u,v), y = Y(u,v), z = Z(u,v), where u,v are

the parametric domain parameters.

The program displays the surface by sampling it along its isoparametric

curves, and approximating (with settable accuracy) them as piecewise linear

polylines. It it also possible to save the surface as a collection of polygons

approximating the surface (again with settable accuracy).

As on line help is available (you can modify it (!) if you like, as it

is all saved in the drawfn3d.hlp plain ascii file).

Options:

--------

-z : displays current version and state as read from configuration file

drawfn3d.cfg (see below).

Configuration:

--------------

The program can be configured using a configuration file named drawfn3d.cfg.

This is a plain ascii file you can edit directly and set the parameters

according to the comments there. executing 'drawfn3d -z' will show the

current configuration as read from the configuration file. This file can be

in any directory which is in your path - the same place as drawfn3d.exe is

probably a good choice.

The program was mainly tested on HERCULES graphics card, some on CGA,

and almost nothing on a VGA system. However it uses the Turbo C BGI excellent

package and so there is a good chance it will work on the laters, without any

problem. I am going to fully support only HERCULES card, till I will have

enough money to buy new VGA (you can buy me one!).

The BGI autodetect feature is used, but if this fails, or the VGA mode does

not work as you expect, you can always coerce it to a specific card - see

the drawfn3d.cfg file.

The program will use 80?87 if it detects one - again uses the Turbo C 80?87

autodetect, or will run (much!) slower without it...

The program will use the mouse, if detected. If this detection fails you can

coerce it (to TRUE - exists, or FALSE) in the drawfn3d.cfg configuration file.

Usage:

------

The control of the program is performed by moving the graphical cursor along

the menu and performing EXECUTE operation (see below). Moving the cursor can

be made using the numerical keypad/arrows (shifted for faster movement) or

if mouse is available, using the mouse. Two operation are defined and allowed:

EXECUTE - the key on the keyboard, or left mouse button if exists.

ABORT - the key on the keyboard, or right mouse button if exists.

The EXECUTE operation is used to request performing the selected menu item.

The ABORT operation is used to request abortion of current operation (handy for

big data files).

In addition if the first character of the menu entry is unique (i.e. only one

menu entry starts with the letter X) that letter may be used to pick that

entry.

Each string entry (such as function) can be edited as follows:

1. Left/Right arrows : to move left and right along the line.

2. Home/End : to move to beginning/end of line.

3. Delete : to delete character cursor is on.

4. Back space : to delete one char backward.

5. Insert : toggles insert/overwrite mode. Node cursor shape is modified.

6. Esc : clear the entire line.

7. CR : to accept line and quit.

ALT-Q can be used, at any time the cursor is shown, for program abortion

exactly as 'Quit' menu item.

Expressions are regular infix expressions with regular precedence:

lowest (-, +) (*, /, %, min, max) (^) (unar -) highest. Note the modulo

operator (%) which operates on the truncated numbers. Also "min" and "max"

are provided as binary operators. The following built in functions

are also provided (sorted lexicographically):

ABS - absolute value function.

ARCCOS - arc cosine (in radians) function.

ARCSIN - arc cosine (in radians) function.

ARCTAN - arc tangent (in radians) function.

COS - cosine (in radians) function.

EXP -exponent (based e) function.

LN - logarithm (natural base) function.

LOG - logarithm (base 10) function.

SIN - sin (in radians) function.

SQR - square function

SQRT - square root function.

TAN - tangent function.

Bugs:

-----

O.k. if you do have any question, suggestion, or even want to report a bug

(including VGA problems, but I dont promise anything about this one), feel

free to send me email (see below)

Feel free to make copies of this program, and distribute them FREE of

charge, provided that all this package is distributed.

I am not going to be responsible for any damage of any kind, that this

package may cause (I always wanted to say that...), but I hope you will

enjoy it as I did my best you will. At list I enjoyed writing it.

Have Fun

Gershon Elber

[email protected]

-------------------------------------------------

BECAUSE DRAWFN3D IS LICENSED FREE OF CHARGE, I PROVIDE ABSOLUTELY NO

WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT WHEN

OTHERWISE STATED IN WRITING, I GERSHON ELBER PROVIDE DRAWFN3D PROGRAM "AS IS"

WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT

NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A

PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE

PROGRAM IS WITH YOU. SHOULD THE DRAWFN3D PROGRAM PROVE DEFECTIVE, YOU ASSUME

THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL GERSHON ELBER,

BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES,

OR OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE

USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR A

FAILURE OF THE PROGRAM TO OPERATE WITH PROGRAMS NOT DISTRIBUTED BY GERSHON

ELBER) THE PROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF

SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.

This program allows drawing of 3D free form explicit algebraic

surfaces of the form: x = X(u,v), y = Y(u,v), z = Z(u,v), where u,v are

the parametric domain parameters.

The program displays the surface by sampling it along its isoparametric

curves, and approximating (with settable accuracy) them as piecewise linear

polylines. It it also possible to save the surface as a collection of polygons

approximating the surface (again with settable accuracy).

As on line help is available (you can modify it (!) if you like, as it

is all saved in the drawfn3d.hlp plain ascii file).

Options:

--------

-z : displays current version and state as read from configuration file

drawfn3d.cfg (see below).

Configuration:

--------------

The program can be configured using a configuration file named drawfn3d.cfg.

This is a plain ascii file you can edit directly and set the parameters

according to the comments there. executing 'drawfn3d -z' will show the

current configuration as read from the configuration file. This file can be

in any directory which is in your path - the same place as drawfn3d.exe is

probably a good choice.

The program was mainly tested on HERCULES graphics card, some on CGA,

and almost nothing on a VGA system. However it uses the Turbo C BGI excellent

package and so there is a good chance it will work on the laters, without any

problem. I am going to fully support only HERCULES card, till I will have

enough money to buy new VGA (you can buy me one!).

The BGI autodetect feature is used, but if this fails, or the VGA mode does

not work as you expect, you can always coerce it to a specific card - see

the drawfn3d.cfg file.

The program will use 80?87 if it detects one - again uses the Turbo C 80?87

autodetect, or will run (much!) slower without it...

The program will use the mouse, if detected. If this detection fails you can

coerce it (to TRUE - exists, or FALSE) in the drawfn3d.cfg configuration file.

Usage:

------

The control of the program is performed by moving the graphical cursor along

the menu and performing EXECUTE operation (see below). Moving the cursor can

be made using the numerical keypad/arrows (shifted for faster movement) or

if mouse is available, using the mouse. Two operation are defined and allowed:

EXECUTE - the

ABORT - the

The EXECUTE operation is used to request performing the selected menu item.

The ABORT operation is used to request abortion of current operation (handy for

big data files).

In addition if the first character of the menu entry is unique (i.e. only one

menu entry starts with the letter X) that letter may be used to pick that

entry.

Each string entry (such as function) can be edited as follows:

1. Left/Right arrows : to move left and right along the line.

2. Home/End : to move to beginning/end of line.

3. Delete : to delete character cursor is on.

4. Back space : to delete one char backward.

5. Insert : toggles insert/overwrite mode. Node cursor shape is modified.

6. Esc : clear the entire line.

7. CR : to accept line and quit.

ALT-Q can be used, at any time the cursor is shown, for program abortion

exactly as 'Quit' menu item.

Expressions are regular infix expressions with regular precedence:

lowest (-, +) (*, /, %, min, max) (^) (unar -) highest. Note the modulo

operator (%) which operates on the truncated numbers. Also "min" and "max"

are provided as binary operators. The following built in functions

are also provided (sorted lexicographically):

ABS - absolute value function.

ARCCOS - arc cosine (in radians) function.

ARCSIN - arc cosine (in radians) function.

ARCTAN - arc tangent (in radians) function.

COS - cosine (in radians) function.

EXP -exponent (based e) function.

LN - logarithm (natural base) function.

LOG - logarithm (base 10) function.

SIN - sin (in radians) function.

SQR - square function

SQRT - square root function.

TAN - tangent function.

Bugs:

-----

O.k. if you do have any question, suggestion, or even want to report a bug

(including VGA problems, but I dont promise anything about this one), feel

free to send me email (see below)

Feel free to make copies of this program, and distribute them FREE of

charge, provided that all this package is distributed.

I am not going to be responsible for any damage of any kind, that this

package may cause (I always wanted to say that...), but I hope you will

enjoy it as I did my best you will. At list I enjoyed writing it.

Have Fun

Gershon Elber

[email protected]

December 6, 2017
Add comments