Interesting curves as basis for lathing, extrusions etc

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Interesting curves as basis for lathing, extrusions etc // New Users

1  |  

Post by MountEtna // Sep 20, 2008, 7:50am

MountEtna
Total Posts: 6
I am a very new user & am still finding my way around the manual.


About 20 years ago my grandfather (an amateur mathematician amongst other things) died, and a large selection of algebraic equations and their corresponding curves came into my possession.


How do I turn these equations into something which TrueSpace can use as a basis for lathing, extruding, path-following etc? For instance (picked more or less at random from my archive) there's a curve that plots in 2 parts - a shallow V shape rounded at the base and a thing like an egg which when lathed would make a rather fetching shallow dish and, indeed, an egg-shape depending on the values for X chosen (see below).


Its equation is: y=SQRT(((2*x/3)^3) - (2*x/3)). Can I use the 'scripts' for this, e.g. to draw a poly-line or something derived from this equation (i.e. using values of x from x=a to x=b)? Actually there's a suggestion I can - somewhere in the installed manual's Chapter 2 User Interface there's reference to drawing a circle in angle steps. If the scripts use a conventional programming language then in principle I see no problems, but I know enough about software packages to know 'there's many a slip 'twixt cup and lip'! For instance I can see it being one thing simply printing out a range of values and quite another translating these into poly-line, NURBS etc. A NURBS line would be nice as these are smooth curves, but would the software interpolate between the points correctly for an equation like this?


Any views out there? I may not get around to this for a while but it would still be interesting to know what the options were. Could you alternatively import a graph line from something more specifically mathematical like Microsoft Excel?


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


Many years ago (1991 or thereabouts) I did achieve some success with this using 'Imagine' on an Amiga. I worked out the table of values entirely manually (well, probably with the help of a calculator and/or SuperCalc spreadsheet), printed them out and translated them to screen co-ordinates and stored the lines as objects. I remember using one of Grandfather's curves extruded as a rather stylish curved roof. I even did dy/dx=0 on it to find the highest point so that I could put a support there. 'Imagine' was a godsend to the mathematically-inclined as you could plot points into the view to arbitrary accuracy, then join the points to make the equivalent of present-day polylines.

Post by seavu // Sep 20, 2008, 8:48am

seavu
Total Posts: 46
Much of this should be doable in tS. I can't answer your specific questions but take a look in the library for Objects - Script Objects. There are examples of how to construct vertex and triangle lists that should get you pointed in the right direction.

edit: The trueSpace developer's guide gives an intro to scripting, but I forgot where I got it now.

Post by MountEtna // Sep 20, 2008, 11:40am

MountEtna
Total Posts: 6
To Seavu: Thanks very much, that looks encouraging. I may in fact try manual methods first the way I used to in 1990-2 with the Commodore Amiga package (if I can find a way of plotting points accurately then joining them) & later try the scripting way. I feel there must be a way of doing this, it's just a matter of finding the best way. Grandfather's legacy will live on yet (eventually)!

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

In the light of the huge advances since 1992 it's interesting that on 8Mb of RAM and a lowly 12-bit (4096)-colour palette I was able to do a passably convincing rendering (using ray-trace and crude 'ambient light' only, no such thing as Radiosity in those days!) of a Renaissance church in Arezzo, Italy. I think it took about 6-8 hours (overnight anyway) to render. I rendered in daylight and moonlight (through the windows) and candle-light (positioned near the altar).
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn