Close

Rubies, Diamonds or Jade?

A project log for Narcissus 12.0

This project will explore a number of issues that are involved in creating a personality for an interactive chat-bot or actual robot.

glgormanglgorman 07/15/2024 at 20:070 Comments

As I see it, if LAME is an acronym for "Lame isn't an MP3 Decoder", and if GNU is an acronym for "GNU is not UNIX", then what might JADE stand for?  How about "Jade isn't Just Another Doom Engine" either?  And it isn't another Doom engine yet, in any case.  But at least I am starting to be able to stockpile my bookshelf, with teapots and things.  Maybe adding some plywood sheathing or a nice brick facade to the exterior of those walls wouldn't be such a bad idea either., along with a nice interior finish, of course.  And never mind the fact that most of the western United States is experiencing a thousand-year drought; a nice green lawn is going to be another "must have" - and finally, as discussed in a previous post, I know how to do it.

Ever wanted to build a REAL "Tiny House" with a simple, easy, and fast floor-plan editor?  Or how about a nice bookcase that hopefully doesn't fall apart in a week?  Honestly, I find the fact that "Blender" is something like Two MILLION lines of code, kind of appalling, and while Ki-CAD is also an excellent open-source project, I am not aware of anyone using it as a game engine, or as a substitute for Auto-CAD or Vector works.

A real-world bookshelf is something that is on my to-do list, and for whatever it is worth, printing to PDF is supported in an earlier version, IIRC of what I am working on right now, i.e. in the Terminal-View, and or Signal-View classes in my Propeller Debug Terminal application that I wrote, whenever that was, I think it was 2019.  Yeah, so maybe this works in the code that is on Git?  I will have to check on that.

Of course, I still need to add DOOM support, Raspberry Pi support, and P2 support.  But architectural drawings in a standard format, and properly scaled, maybe even good enough for some building departments, just in case your Tiny House needs a permit, well - it's not that hard to do.  Or one can export the OBJ files and pull them into another program like Blender (free) or Auto-CAD ($$$$!) for additional work.

And I still want to do SHRDLU.  But in the meantime .... 

Yeah, in the "meantime", I got some more objects to render in OpenGL, and am starting to fill up the bookcase a bit more.  Also figured out how to get some sheathing up on those walls.  This means of course, that "Tiny-CAD" is very much alive, and the prospects are looking to be a lot more realistic as far as having a chance of being able to generate not just some fun game objects, but the idea of being able to, as I said, actually print out usable "working drawings" for some very useful real-world stuff.  Doors and Windows would also be nice I suppose.  Along with some electrical and plumbing maybe?  How much more complicated can it get?  Well, actually - now that I mention it, there is a method to some of the madness, that I should probably go into at some point because I figured out something quite interesting the other day while fixing up the icosahedron code, which now looks in part something like this:

icosahedron::icosahedron ()
{
    int i,j,edges;
    MATH_TYPE x,y,z,theta,phi;
    m_color = COLOR::green;
    m_vertex = &(m_vertexes[0]);
    m_vertex [0] = _vector (0,0,1);    
    m_size = _vector(1000.0,1000.0,1000.0);
    for (i=0;i<11;i++)
    {
    theta = 2*i*PI/10;
    phi = (i%2==0? PI/3:PI-PI/3);
    x = cos(theta)*sin(phi);
    y = sin(theta)*sin(phi);
    z = cos(phi);
    m_vertex [i+1] = _vector(x,y,z);
    }
    m_vertex [11] = _vector (0,0,-1);
    edges = 0;
    for (i=0;i<12;i++)
    for (j=i+1;j<12;j++)
    if (m_vertex [i].dot (m_vertex [j])>0)
    {
    m_edges [edges][0] = i;
    m_edges [edges][1] = j;
    edges ++;
    }
    size_t sz = sizeof(m_faces);
    memset (m_faces,0,sz);
    ASSERT(edges==30);
    construct_faces ();
    thing::m_gl_index = GL_OBJECTS::GL_ICOS;
}

O.K., take a look at what is happening here because I figured out how to do something that is mind-boggling.   Do you see that section where it says: if (m_vertex [i].dot (m_vertex [j])>0) and then, in effect whenever that dot product of two vertexes, (hint there are 12) is greater than zero, that is when we have a valid edge, that is to say, for the 30 possible valid combinations of two vertexes out of the 66 total permutations of pairs of vertexes.  

Next, and elsewhere, I do another test on a pair of edges, to see if they share a connection, and then and only then, if they do, I check to see if they also form a triangle, and then I generate a polygon until all 20 triangles are solved!   Weird, but it works!  And there is something cool I think about actually being able to solve for the edges and faces, and not just to simply look them up in some table as if the only way to do it was to have it all "pre-calculated"!

This gives me an idea about how to perhaps generate point clouds from photographs, let's say - and then if you can do that - why not solve for edges, faces, and therefore objects - in the more general case.  Otherwise, I don't know how the "deep-AI" people are trying to do it, even if what I am now thinking of also seems to hint at a merger of ideas, along the lines of finding the convex hull, vs. variations on the traveling salesman's problem.

Discussions