Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] - dark basic pro

Author
Message
Hybrid1973
11
Years of Service
User Offline
Joined: 29th Oct 2011
Location:
Posted: 29th Oct 2011 18:39 Edited at: 4th Nov 2011 22:52
Hi there;
I wanna try to give a small contribute to the community with a small function that allows to create a pyramid with variable basis width, pyramid height and number of faces.
For higher values of number of faces, pyramid will look like to a cone.

Hybrid1973
11
Years of Service
User Offline
Joined: 29th Oct 2011
Location:
Posted: 29th Oct 2011 19:33
ehm ops,
I think you have to delete every single group of backslash near quotes and double quotes.
So sorry.
Every tab is gone too.
How to put everything under the code snippet button please?
Ty.
Webber
11
Years of Service
User Offline
Joined: 27th May 2011
Location:
Posted: 3rd Nov 2011 07:02
Select your code, and then press the code button.

I like games, and stuff.
Hybrid1973
11
Years of Service
User Offline
Joined: 29th Oct 2011
Location:
Posted: 3rd Nov 2011 19:19
Ok thanks
IanM
Retired Moderator
20
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Nov 2011 23:00
I've cleared up the backslashes for you.

In addition, the sides of the cone are a bit corrugated - this is because your arrays are integer arrays, not float arrays, so you lose some precision.

Change the array definitions to this:

... and the problem goes away.

Hybrid1973
11
Years of Service
User Offline
Joined: 29th Oct 2011
Location:
Posted: 5th Nov 2011 15:10
Oh that's right!
@IanM I'm now beginning to understand how the forum is structured and I see that there is a section dedicated for sharing software with others.
Can you - as moderator - place my code in the "code base" session please?
You can also explain to me how to do.

Login to post a reply

Server time is: 2022-12-01 13:37:38
Your offset time is: 2022-12-01 13:37:38