Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
3d blobmaker program
#1
I stumbled on this site blobmaker which lets you visually create random 2-D shapes - you pick a color and use a couple slider controls to choose a number of vertices (seems to be 3-7?) and how regular or symmetrical the shape is, and click a randomize button and it morphs or changes the shape onscreen. 
I thought it might be neat to make a prog that does something like this but for 3d shapes (or 4d where you choose 2 or more shapes as "keyframes" and it morphs from one to the other) and it lets you choose more vertices (whatever your cpu or graphic card can handle), and color gradations or patterns across 3 dimensions, and displays the 3d shape rotating on the screen (maybe the axis of rotation can slowly change too) and maybe even auto-generates an STL file for a 3D printer when you press a hotkey, or a different hotkey generates whatever file is the 3D equivalent of a SVG file, etc.

I understand how an array can store a bunch of 3d coordinates of begin and end points for lines, but that's about as far as my 3d skills go. Does anyone know of any existing QB64PE project or code that could be easily adapted to draw and rotate or animate a 3d object like this?

This would basically be a kind of lava lamp construction set...?

Something like this!! Random animation, like "the amazing mr. bickford"!
Static shape creator with advanced parameters (way more than I was thinking of!):
A tutorial on another one (not as organic looking as the above examples) 
Reply
#2
good idea madscijr, seems easy enough but i haven't done the homework on smooth 3D surfaces yet.  KingAshish did do a parametric surface plotter based on SUB _GL, ie qb64pe's opengl extensions -- you could try to find knot parametrizations for that

this does remind me of this mod:
Reply
#3
I'll check this out when I return from my computing sabbatical, LoL. 
I see it imports a library dom.bas, where might this be found? 
Thanks for sharing this and have a nice weekend!
Reply
#4
(03-14-2025, 05:17 AM)madscijr Wrote: I see it imports a library dom.bas, where might this be found? 
That’s one of the standard extended libraries included with QBJS:
QBJS Standard Modules
Reply
#5
(03-14-2025, 11:14 AM)dbox Wrote:
(03-14-2025, 05:17 AM)madscijr Wrote: I see it imports a library dom.bas, where might this be found? 
That’s one of the standard extended libraries included with QBJS:
QBJS Standard Modules
Oh okay, I wasn't on a computer browser, now I see it running. That's pretty neat - it definitely looks like the beginning for a blobmaker!  Wink 
It just needs some more vertices and stuff, and then move it to 3D (which is the part that is daunting to me)... 

PS that QBJS is pretty neat! I didn't realize it had a library to handle web controls and it's event-driven and all that. Are QBJS and the libaries just javascript files you can download and use in your own web site, or do they need to be hosted on the qbjs web site? That question is neither here nor there and not related to this thread, I was just curious. Thanks for sharing that!
Reply
#6
(03-14-2025, 02:49 PM)madscijr Wrote: PS that QBJS is pretty neat! I didn't realize it had a library to handle web controls and it's event-driven and all that. Are QBJS and the libaries just javascript files you can download and use in your own web site, or do they need to be hosted on the qbjs web site? That question is neither here nor there and not related to this thread, I was just curious. Thanks for sharing that!
Thanks @madscijr! QBJS has a feature that will allow you to export the compiled version of your program along with the other html depedendcies that you can include in your own web site:
   
   
Reply
#7
if this isn't mad science
Reply
#8
(03-14-2025, 04:47 PM)dbox Wrote: Thanks @madscijr! QBJS has a feature that will allow you to export the compiled version of your program along with the other html depedendcies that you can include in your own web site:

You've got to be kidding - that is beyond awesome!
Reply
#9
(03-14-2025, 04:47 PM)dbox Wrote: Thanks @madscijr! QBJS has a feature that will allow you to export the compiled version of your program along with the other html depedendcies that you can include in your own web site:

I have a followup question - can QBJS do any kind of networking? For example if 2 people run the same code on the same site, could they communicate, as in a network game or chat program?
What kind of things, as a Web app, can QBJS programs do?
Reply
#10
(03-15-2025, 02:32 AM)madscijr Wrote: I have a followup question - can QBJS do any kind of networking? For example if 2 people run the same code on the same site, could they communicate, as in a network game or chat program?
What kind of things, as a Web app, can QBJS programs do?
Yes, QBJS can do networking.  Like any other browser-based web application it would need to connect to a web server for communication.  I actually made a chat client in QBJS a little while back.  The chat http server was built in QB64 as QBJS doesn't support server-side or console type applications (yet).  I shut down the public server a few weeks after the posting but you could still run it locally if you were interested in experimenting with connecting multiple chat windows to it to simulate multiple users.
https://qb64phoenix.com/forum/showthread...=qbjs+chat

At some point I'd like to build an Import library that provides expanded support for networking but haven't gotten around to it yet.  In the meantime, there is also the undocumented Fetch command that can be used to query REST-based services.  For example, you might want to make a program that can get Chuck Norris Facts from an online API.
Reply




Users browsing this thread: 1 Guest(s)