LB Booster
« As I was going to St. Ives... »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:19am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: As I was going to St. Ives...  (Read 294 times)
Alincon
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 147
xx As I was going to St. Ives...
« Thread started on: Nov 12th, 2016, 9:04pm »

I was trying to visualize an array with more than two dimensions and I thought of the Nursery rhyme:
dim one: wives/folders
dim two: sacks/files
dim three cats/records
dim four kittens/fields

Does anyone have a demo of using an array with more than 3 dimensions that is more practical than this?

I'm guessing that multidimensional arrays might be used in higher math.

r.m.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: As I was going to St. Ives...
« Reply #1 on: Nov 13th, 2016, 09:30am »

on Nov 12th, 2016, 9:04pm, Alincon wrote:
Does anyone have a demo of using an array with more than 3 dimensions that is more practical than this?

More than 3 or more than 2? You refer to both options in the question.

I don't know whether it's helpful, but in Bluatigro's recently posted CG animation thread he ideally needs a 3D array, but has simulated it using a 2D array - which is one reason why the program runs so slowly. He has a set of 3D objects, each of which has a position/size/orientation represented by a 4x4 matrix. So altogether it's an array of 2-dimensional arrays, i.e. a 3D array.

Another example would be to use a 3D array to describe the red, green and blue components of an image. The first index might correspond to the x-coordinate, the second index to the y-coordinate and the third index might contain the value 1, 2 or 3 (for R, G and B) to indicate which color component is stored.

You could extend this idea to a 4D array containing a set of 2D images. The first index would be the image number, the second and third indices the x&y coordinates and the fourth index the color component.

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls