Author Topic: Render a 3D skull from 2D images  (Read 6110 times)

0 Members and 1 Guest are viewing this topic.

Offline OldsCool

  • Newbie
  • Posts: 19
  • 3D Spherical programming is as easy as pi
    • View Profile
Render a 3D skull from 2D images
« 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."
skull.png
* skull.png (Filesize: 2.73 MB, Dimensions: 7990x5280, Views: 276)
* 3D skull from 2D images.bas (Filesize: 7 KB, Downloads: 175)
« Last Edit: June 02, 2021, 11:08:04 pm by OldsCool »

FellippeHeitor

  • Guest
Re: Render a 3D skull from 2D images
« Reply #1 on: June 02, 2021, 11:28:41 am »
That was cooler than I'd expected!

Welcome aboard, OldsCool.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Render a 3D skull from 2D images
« Reply #2 on: June 02, 2021, 11:57:43 am »
Nice 3D rotations and I could actually escape from FullScreen ;-))

Welcome @OldsCool

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Render a 3D skull from 2D images
« Reply #3 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

Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Render a 3D skull from 2D images
« Reply #4 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
Logic is the beginning of wisdom.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Render a 3D skull from 2D images
« Reply #5 on: June 02, 2021, 04:54:04 pm »
Quote
Bplus will fill you in on my next question... lol

The answer is...
 
The answer is yes.PNG

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Render a 3D skull from 2D images
« Reply #6 on: June 02, 2021, 05:38:05 pm »
Edit: Oops never mind...
« Last Edit: June 02, 2021, 05:40:52 pm by bplus »

Offline OldsCool

  • Newbie
  • Posts: 19
  • 3D Spherical programming is as easy as pi
    • View Profile
Re: Render a 3D skull from 2D images
« Reply #7 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...

Offline OldsCool

  • Newbie
  • Posts: 19
  • 3D Spherical programming is as easy as pi
    • View Profile
Re: Render a 3D skull from 2D images
« Reply #8 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 !
 
flying saucer.png
* flying saucer.png (Filesize: 199.74 KB, Dimensions: 7990x5280, Views: 156)
Saucer.png
* Saucer.png (Filesize: 53.66 KB, Dimensions: 1606x1029, Views: 150)
« Last Edit: June 02, 2021, 10:50:07 pm by OldsCool »

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Render a 3D skull from 2D images
« Reply #9 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


Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Render a 3D skull from 2D images
« Reply #10 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
Logic is the beginning of wisdom.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Render a 3D skull from 2D images
« Reply #11 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
« Last Edit: June 03, 2021, 06:11:49 pm by Pete »
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline OldsCool

  • Newbie
  • Posts: 19
  • 3D Spherical programming is as easy as pi
    • View Profile
Re: Render a 3D skull from 2D images
« Reply #12 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!)
« Last Edit: June 03, 2021, 11:41:44 pm by OldsCool »

Offline OldsCool

  • Newbie
  • Posts: 19
  • 3D Spherical programming is as easy as pi
    • View Profile
Re: Render a 3D skull from 2D images
« Reply #13 on: June 03, 2021, 10:05:21 pm »
Did I pass the audition? I didn't even study.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Render a 3D skull from 2D images
« Reply #14 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!"