The Liberty BASIC Wire Frame Library

Tomas P Nally - steelweaver52 steelweaver52

Chapter 3: Version 1.0 of the Wire Frame Library Is On The Horizon

This third article of the Liberty BASIC Wire Frame Library series originally appeared in the Liberty BASIC Newsletter, Issue #136. It is reprinted here with the permission of the author.

Again, What the Heck is LBWF?

The Liberty BASIC Wire Frame Library (LBWF) is a collection of 50 functions written with native Liberty BASIC commands which allow Liberty BASIC programmers to easily create and manipulate images of three-dimensional wire frame objects. A wire frame object is an object whose edges are visible, but whose surfaces are transparent. A wire frame cube looks like a cube made from the wire of a coat hanger.

LBWF was first introduced in this article in the Liberty BASIC Newsletter, Issue 134 and can be viewed here as Chapter 1: Introducing the Liberty BASIC Wire Frame Library. The original release of the library was designated 0.5. One month later, I released version 0.6 with Liberty BASIC Newsletter, Issue 135. That article can be viewed here as well at Chapter 2: The Liberty BASIC Wire Frame Library - Version 0.6.

Through version 0.6, LBWF offered nine different primite objects; the ability to hide objects; the ability to move and rotate objects about three different axes; and the ability to assign objects to custom groups, and to manipulate objects based on their group identity.

The purpose of this article is to let you know what to expect when Version 1.0 debuts within the next few versions of the newsletters.

What's To Expect With LBWF Version 1.0?

One thing that I've decided with the release of version 1.0 is to give the library a "friendly name" in addition to its formal name. It's formal name will remain The Liberty BASIC Wire Frame Library Version 1.0. The friendly name will simply be Wire 1.0. I like it because it's easy, simple, and enables us to discuss the library without typing capital L, capital B, capital W, capital F...

More importantly, Wire 1.0 will have two new interesting functions. The first function will allow programmers to create complex objects. It is called, well, FF.LBWF.CreateComplexObject(). A complex object can be thought of as anything other than the nine primitive, standard objects that are part of basic Wire 1.0. To create a complex object, the user will have to create the data for the object in an external ascii file. Then, the function will read the data, and store the information in Wire's internal database.

A spacecraft created with the help of the
complex object function

The second function is called FF.LBWF.RequestObjectNameFromXY$(). This function takes as input the x and y coordinates of a pixel in the graphic box where Wire's images are being displayed. It returns the name of the object which has a line which passes through (or near) that pixel.

Why is this particular function exciting? Because it will allow the user to select a 3D object by merely clicking on one of the lines that comprise the object. So, for example, by clicking on a 3D object, the user can make it spin in space, provided all the appropriate rotation functions are called.

At this time, Wire 1.0's functions are complete, but I've yet to develop an article that documents the new functions. Expect Wire 1.0 in Chapter 4.

Tom Nally

Chapter 1: The Liberty BASIC Wire Frame Library
Chapter 2: The Liberty BASIC Wire Frame Library - Version 0.6
Chapter 3: Version 1.0 of the Wire Frame Library is On the Horizon
Chapter 4: Wire 1.0 Released (Making Complex Objects With Wire
Chapter 5: Using Wire (Focusing on the FF.LBWF.RequestObjectNameFromXY$() Function)
Chapter 6: Using Wire (Strange Things, Reminders, and Tips)

Note: There were some minor editing changes made to this article from the original. These changes were made with the author's permission and do not alter the informational content of the article in any way. Specifically, references to issues of the Liberty BASIC Newsletters were changed to also include chapters. This change was made for the singular purpose of providing clarity and ease in navigating throughout these Liberty BASIC Programmer's Encyclopedia pages. - JanetTerra JanetTerra