Search This Blog

Thursday, August 13, 2026

PTutor. My Perspective Construction Tutor Program. Helped by AI.

In graduate school (1987 ) my research project was to create a DOS based graphic program that shows how perspective views are created from top and sometimes the side view of a space or object.  I had to use an assembly language call to draw the lines fast enough and an efficient algorithm to calculate the perspective projection. The line drawing tools in compiled QuickBasic were very slow and painful to watch.  When the Windows operating system took over I abandoned all my DOS projects because I couldn't figure out how to port them to run on Windows back then. 

Then came AI. Four decades later. 

The AI agent in Google's Chrome browser is pretty amazing, but does have some flaws.  I have no personal experience in web programming.  Once I asked it if there was a simple way to add a blinking pointer over a photo in my blog.  I was surprised that it wrote a short bit of HTML to demonstrate one possible way. Knowing that it could write HTML to create what I asked it to I went back to the notebook I still have with the steps I took when I planned out my PTutor program.

I started with a small step.  "Make a 640 x 480 black rectangle". It provided code I could copy and saved, and  test in a new Chrome browser tab. Add a step and repeat etc.  After an hour or so we had  a working HTML version of my ancient DOS program.   

Screen Capture

You should be able to download the ZIP file that includes the HTML file here: PTutor

There are a few bugs still to be resolved. I may see if I can spot them in the file opened up in Notepad. I may also give the AI a chance to fix the ones I've found. 

Frankly I was stunned. The AI would even redo the code when I asked it to make it more efficient and smaller. Nice tight code was mandatory for complex projects running in DOS.

The AI also made occasional typos. I'd spot them when I ran the updated code. It would spot the error and correct it when I pointed it out, but not volunteer that the code it produced had an error. Lesson here:  Don't trust an AI to provide flawless code. I had to run each code update to make sure nothing had broken. Two steps forward were consistently followed by one step back. 

I am also conflicted.  I have a couple of relatives that are web programmers. AI could replaced them or at least reduce their work down to just outlining what the program or page needed to do and letting the AI write it. I taught furniture design to college students.  There is at least one AI out there that can iterate through as many variations of a design as you want, with no need to pick up a pencil and sketch pad. 

The version at the download link has a few bugs.  I'll replace the link here if/when I have a bug-free version. 

Have a look.  Have a play.  Leave a comment here if you have an opinion.

4D


No comments: