QB64.org Forum

Active Forums => Programs => Topic started by: OldsCool on June 02, 2021, 11:20:44 am

Title: Render a 3D skull from 2D images
Post by: OldsCool on June 02, 2021, 11:20:44 am
A new updated program version is now attached that scans 0-180 deg properly and already contains the program patches I listed below. I also included another image file(attached at the bottom post of this thread) that creates a Flying Saucer

the following is what changed from the original program attachment:
"UPDATE... I found that I had hard-wired the 'Total number of Degrees to scan' value as pi in the main rendering loop. it was scanning 180deg regardless of the value you input at start up. I have fixed it but wasn't sure of how/where to update the post with the new code.  with the fix below you get a NEAT  'CT scan' effect when scanning <180 deg. (simply alter the startup value of the variable 'tnd' on line 10 after replacing the code below and give it a try !)

substituted the code on line 21 with:
pointincriment# = (3.14159265359 / tnd) * (tnd / 180)

substituted the code on line 38 with:
FOR degrees# = 0 TO tnd * .017444444 STEP pointincriment#

thanks for your patience, just a newbie. 

original msg:
"Hello, this is my first upload on this site (or any site). attached is a program i created a few years ago to experiment with making a spherical 3D model from 2D images.  depth shading included."
Title: Re: Render a 3D skull from 2D images
Post by: FellippeHeitor on June 02, 2021, 11:28:41 am
That was cooler than I'd expected!

Welcome aboard, OldsCool.
Title: Re: Render a 3D skull from 2D images
Post by: bplus on June 02, 2021, 11:57:43 am
Nice 3D rotations and I could actually escape from FullScreen ;-))

Welcome @OldsCool
Title: Re: Render a 3D skull from 2D images
Post by: Pete on June 02, 2021, 02:02:59 pm
Frankly I find that to be a pretty spineless contribution. Try redoing it in Crystal-Basic. At least then you'll have one of those Crystal Skulls. I hear if you put 9 of those together, you'll get Quantum-Basic, AKA QB64 v 1.6. Anyway, nice work, very impressive. I liked it almost as much as the play on words... OldsCool. To qoute a favorite old comedian of mine, that's _blankin' brilliant!

Welcome to the asylum forum.

Pete

Title: Re: Render a 3D skull from 2D images
Post by: johnno56 on June 02, 2021, 04:37:54 pm
I was half expecting "skeletal" word plays... Nice one Pete... lol

That is a pretty cool demo for a "first timer". Very well done.... and Welcome!!

Bplus will fill you in on my next question... lol
Title: Re: Render a 3D skull from 2D images
Post by: bplus on June 02, 2021, 04:54:04 pm
Quote
Bplus will fill you in on my next question... lol

The answer is...
  [ This attachment cannot be displayed inline in 'Print Page' view ]  
Title: Re: Render a 3D skull from 2D images
Post by: bplus on June 02, 2021, 05:38:05 pm
Edit: Oops never mind...
Title: Re: Render a 3D skull from 2D images
Post by: OldsCool on June 02, 2021, 05:57:09 pm
This was written more than 2 years ago as a proof of concept for myself. I have vastly improved upon what I learned from this. more to come...
Title: Re: Render a 3D skull from 2D images
Post by: OldsCool on June 02, 2021, 08:31:02 pm
Now that I've dusted off this old program I couldn't resist making another Image to demo.
Either rename this attachment to 'skull.com' or change the code to substitute the file name 'Flying Saucer.png'

Actually, since the attached Saucer pattern does not change from frame to frame it could be reproduced with only ONE frame instead of 72 by not advancing the image pointers.

This was fun but NOW I'm done.  I challenge all to find ways to have fun with this !
 
Title: Re: Render a 3D skull from 2D images
Post by: Pete on June 02, 2021, 11:31:15 pm
Wait. You had to dig up the skull demo? Well perhaps now is as good a time as any to remind everyone that acts of skullduggery are frowned upon, on this forum. Now if you will excuse me, I have to hold Steve's head... while he throws up in the hopper. It's a big job, because Steve has a big head, but I've been punning in place for days, so I'm more than up to the challenge.

Out of curiosity, what, if any coding these days, trips your trigger?

Pete


Title: Re: Render a 3D skull from 2D images
Post by: johnno56 on June 03, 2021, 03:23:19 pm
"Skullduggery"? Did not see that one coming... *sigh* There are days I question your sanity, Pete... lol
Title: Re: Render a 3D skull from 2D images
Post by: Pete on June 03, 2021, 06:05:11 pm
"Skullduggery"? Did not see that one coming... *sigh* There are days I question your sanity, Pete... lol

My av-ee-tar has a firm policy regarding that one. It's called "Shoot first, and shoot people who ask questions, later."

Later,

 - Sam :D :D :D

Well, I guess OldsCool might be a one and done. Well two... Oh, two and through, that works! I would love to get some bio stuff about him though. It's always interesting to see when people started coding and what they like to code. What's cool is how long many of us here have stayed with it.

Pete
Title: Re: Render a 3D skull from 2D images
Post by: OldsCool on June 03, 2021, 09:43:31 pm
I was only saying that I was done with this particular program thread , not with this forum. from the comments I've seen so far I think I have found a new home! my wit is much the same as you guys (poor bastards) and humor is the basis of my existence although I'm still waiting to find some out here!

And since the question was posed:
I was born in Florida but moved through much of my youth attending 15 different schools before graduating in 1982 from Western High School, Las Vegas, NV.
I started coding at the age of 14 when Intel first introduced their new 8086 architecture and Apple introduced their Apple DOS 3.1 their Disk II 5 1/4" floppy diskette drive for the Apple II home computer. my first computers were the TRS80 Color Computer and the Commodore. I've always been more of a PC guy then MAC.

I graduated from Education Dynamics Institute in Las Vegas in 1984 (now de funked) where I learned to code in Basic, RPG, FORTRAN and COBOL although once I started attending I found that I had already become proficient in basic (of that time) so they used me as an aid to teach other students. after graduating EDI a took a job with Centex Homes in Fla as administrator of their data processing department and creating custom construction programs (using IBM Mainframes Sys34/36/38 and AS400). I moved on to work for Certainteed Corp as manager of their Mainframe data processing dept then worked for many years as a field tech building and upgrading computers and networks for large businesses.

the big picture is I've been building and programming computers most of my life although I have served as a commercial graphic artist for the past 20+ years. I create and design scale drawings of electronic signs of all types for malls and businesses. I am a master of photo manipulation and Vector graphics of all kinds and use Corel Draw as my main design tool. I think it is the combination of programming and art that keeps me interested in tinkering with programming. I like game development though I've never been much of a gamer, I was always more interested in 'How it works' than playing; unlike some, I was actually able to reassemble all those radios I disassembled back then! I have also been an amateur archeologist for almost 30 years now and have been playing saxophone and other woodwinds since my Las Vegas days. I am semi-retired and spend much of my time at my property in New Mexico and Fla... WHEW ! (you asked!)
Title: Re: Render a 3D skull from 2D images
Post by: OldsCool on June 03, 2021, 10:05:21 pm
Did I pass the audition? I didn't even study.
Title: Re: Render a 3D skull from 2D images
Post by: bplus on June 03, 2021, 11:01:40 pm
;-)) And are you watching TV or something on Internet, see a graphic animation and say, "oh I bet I can do something like that!"
Title: Re: Render a 3D skull from 2D images
Post by: Pete on June 03, 2021, 11:57:25 pm
Did I pass the audition? I didn't even study.

You forgot to answer question 6, but that's okay, it was extra credit. Actually, the bonus question should have been,"Why does bplus use a picture of his mom for his avatar? " Oh well, nice bio. We have a lot of older coders here, many from the QBasic period, which I believe followed the Jurassic one.

The IBM mainframe work took me back. I had a good friend, Mac, who contrary to his name, worked for IBM. He owned the QBasic Forum, on Network54, (now defunct, oh, the hosting company, the forum still lives.) I have another friend from that forum, TheBOB, who is a retired graphics artist. As for me, I stick to SCREEN 0, literally. I'm 20 pixels down and 7 to the right as we speak. I'm mean really, it's the only screen resolution any real programmer would ever need. Perfect for making business apps, which is what I mostly do; although interestingly enough, I learned BASIC by programming games. I coded Wheel of Fortune, Password, Monopoly, and Card Sharps while in college. My first computers were a 4K T.I. 99-4a , followed by 16K Atari. I got a real PC in 1990 and switched to QBasic, to make my own office software.

Well besides comedy, we appear to be the same when it comes to games and gaming. While I wouldn't mind programming one again, I'd probably never play it. Other than that, I like long walks on the beach... Well, let's not go there. 

Pete
Title: Re: Render a 3D skull from 2D images
Post by: OldsCool on June 04, 2021, 12:20:53 am
Yep, Timex Sinclair, Texas Instruments, Atari and all those from that time period. my second computer job in Vegas ('84) was as a salesmen selling the new AT&T PC 6300 was in fact an Olivetti M24 sold under the ATT brand. They introduced GWbasic with that model which I programmed in for a good while. (POS)
so, how long have you and B+ been married? he seems to complete you...
Title: Re: Render a 3D skull from 2D images
Post by: OldsCool on June 04, 2021, 12:29:25 am
bplus, yes to your question above and I seem to be more of a proof of concept person, once I find the main solutions to a project I tend to take what I learned and move on to the the next project . I guess it's the actual problem solving more than the final product that drives me. nice meeting you guys, and yes, even Pete. :)
Title: Re: Render a 3D skull from 2D images
Post by: NOVARSEG on June 04, 2021, 12:31:41 am
I started programming when 48k was a lot of memory  TRS model 4

I was so taken by the floppy it had the ability to STORE  data!!

The TRS 80 had a built in hex editor and came with zilog chips which Intel had to compete with . I think that is why Intel came up with the 8086 to beat Zilog.


Title: Re: Render a 3D skull from 2D images
Post by: Pete on June 04, 2021, 01:14:11 am
Mark, bplus, and I split up some years back, when I caught him cheating on me with Alexa. He said he set it on vibrate, so it wouldn't wake me up in the morning, but I knew what was really going on.

Pete
Title: Re: Render a 3D skull from 2D images
Post by: OldsCool on June 04, 2021, 10:54:14 am
NOVARSEG, same here, after saving code and data to a cassette for so long the 5 1/4" was a game changer, I  used 8" floppy's on IBM mainframe systems which I thought were a bit silly.
Title: Re: Render a 3D skull from 2D images
Post by: bplus on June 04, 2021, 11:18:29 am
I always thought Pete married to Clippy the way he talked about him.
Title: Re: Render a 3D skull from 2D images
Post by: Pete on June 04, 2021, 04:57:52 pm
Sure, try any excuse to get out of the alimony! Alexaaaaaahhhh.

Pete