Mki3dgame is available also as a snap for Ubuntu and (probably) some other distributions that support snaps.
You can install it with the snap command:
$ sudo snap install mki3dgame-snap
and then run the game with:
$ mki3dgame-snap
(Note that there are also AppImages appended to the releases and the source code repository contains bash scripts: make-AppImage.bash and make-snap.bash for making AppImages and Snaps.)
Tutorial posts and news about mki3d program for designing simple 3D models made of colored segments and triangles in web-browsers. Mki3d is available for downloading and ready to use on-line at: https://mki1967.github.io/mki3d/
Thursday, November 2, 2017
Saturday, October 14, 2017
Tutorial Post 20: Using IndexedDB.
Mki3d can now (since version 0.11) store your designs in IndexedDB.
IndexedDB is an internal local database managed by the related browser.
The 'IndexedDB Menu' in mki3d can be invoked by a key sequence 'QB'.
On this menu you can:
The entry is stored with the following attributes: its name and creation date.
You do not need to change the name, since the database can contain many entries with the same name. It is convenient for storing many intermediate versions of your design, or if you do not want to waste your time for inventing the name or deciding where to save the data in the file system.
(Remember that you always can set the current name on the 'Inputs Page'.)
When you inspect the database the entries are sorted by the date and you can preview the stored designs as they where visible on the screen when they where stored.
You start inspecting from the last stored one.
You can cycle through the sequence of entries backward or forward by pressig 'P' or 'N' or arrow keys.
If the database contains too many entries, you can filter them: Press 'F' to invoke the 'IDB Filters' sub-menu.
Here you can set the bounds (or single bound) of dates' range and a sub-string that the filtered entries must contain in their name.
Press 'Enter' key to confirm or 'Esc' to cancel, and return to 'Inspecting IDB'.
While inspecting the database you can also merge, load, or remove the entry. Each of these actions requires confirmation:
You have to press precisely the 'Y' key to confirm. Pressing any other key cancels the action.
The last option on 'Inspecting IDB' sub-menu is 'V' that hides the menu and cursor to show you the the preview in full display.
The IndexedDB can be convenient for rapid storing and previewing of your designs. However, I would recommend that you still save copies of your more precious designs outside the browser: Use 'QFS' key sequence to invoke saving in the files, or by copying text from text areas.
The persistence of your data in IndexedDB may depend on the policy of the browser's producer.
IndexedDB is an internal local database managed by the related browser.
The 'IndexedDB Menu' in mki3d can be invoked by a key sequence 'QB'.
On this menu you can:
- press the key 'A' to store the current design in the database, or
- press the key 'I' to start 'Inspecting IDB' sub-menu for inspecting the database.
The entry is stored with the following attributes: its name and creation date.
You do not need to change the name, since the database can contain many entries with the same name. It is convenient for storing many intermediate versions of your design, or if you do not want to waste your time for inventing the name or deciding where to save the data in the file system.
(Remember that you always can set the current name on the 'Inputs Page'.)
When you inspect the database the entries are sorted by the date and you can preview the stored designs as they where visible on the screen when they where stored.
You start inspecting from the last stored one.
You can cycle through the sequence of entries backward or forward by pressig 'P' or 'N' or arrow keys.
If the database contains too many entries, you can filter them: Press 'F' to invoke the 'IDB Filters' sub-menu.
Here you can set the bounds (or single bound) of dates' range and a sub-string that the filtered entries must contain in their name.
Press 'Enter' key to confirm or 'Esc' to cancel, and return to 'Inspecting IDB'.
While inspecting the database you can also merge, load, or remove the entry. Each of these actions requires confirmation:
You have to press precisely the 'Y' key to confirm. Pressing any other key cancels the action.
The last option on 'Inspecting IDB' sub-menu is 'V' that hides the menu and cursor to show you the the preview in full display.
The IndexedDB can be convenient for rapid storing and previewing of your designs. However, I would recommend that you still save copies of your more precious designs outside the browser: Use 'QFS' key sequence to invoke saving in the files, or by copying text from text areas.
The persistence of your data in IndexedDB may depend on the policy of the browser's producer.
Thursday, September 14, 2017
Changing Current Name on Inputs Page
'CURRENT NAME' input field has been added on Inputs Page to set the name to be used in the name of saved file.
Wednesday, August 30, 2017
MKI3D as Progressive Web App.
MKI3D RAPID MODELER has its on-line version transformed into Progressive Web App.
After you first open the HTML page, the app is cached by the browser.
You can either bookmark or (in Chrome) add the page to your desktop.
Then the application can be used off-line.
Note that the application still needs a physical keyboard. (It is a keyboard-driven editor after all ;-)
After you first open the HTML page, the app is cached by the browser.
You can either bookmark or (in Chrome) add the page to your desktop.
Then the application can be used off-line.
Note that the application still needs a physical keyboard. (It is a keyboard-driven editor after all ;-)
Screen-shot of icon on the desktop (CLICK TO OPEN PWA APP). |
Thursday, August 17, 2017
MKI_SG as Progressive Web App.
The MKI Searching Game (MKI_SG) has stages made with mki3d.
I have transformed its on-line version to Progressive Web App.
Thus, it can be safely installed on mobile device from the browser and played off-line.
Click here for MKI_SG as PWA |
Friday, August 11, 2017
Exporting of the Red-Blue Stereoscopic Views to Interactive HTML Pages.
Now you can export to HTML pages in the red-blue stereoscopic mode. The resulting page contains stereoscopic interactive presentation that can be watched with standard red-blue glasses:
CLICK HERE TO SEE EXAMPLE |
Note that, to make your own exports, you also need the recent version ( >= 4) of the script: mki3d_view.js
Monday, August 7, 2017
Tutorial Post 19: Table of Contents.
This post is a table of contents (listing of the links to tutorial posts in increasing order) and it shall be updated with each new tutorial post.
- Tutorial Post 1: Cursor.
- Tutorial Post 2: Markers - Inserting Segments and Triangles.
- Tutorial Post 3: Data Organisation.
- Tutorial Post 4: Selected and Bookmarked Endpoints.
- Tutorial Post 5: Constructive Points.
- Tutorial Post 6: Clipping.
- Tutorial Post 7: Colors.
- Tutorial Post 8: Light.
- Tutorial Post 9: Action Modes.
- Tutorial Post 10: Inputs Page.
- Tutorial Post 11: Three-point Transformation.
- Tutorial Post 12: Regular Polygons.
- Tutorial Post 13: Cursor Jumping.
- Tutorial Post 14: Copying.
- Tutorial Post 15: Sets.
- Tutorial Post 16: Folding.
- Tutorial Post 17: Constructing regular icosahedron.
- Tutorial Post 18: Exporting as interactive HTML pages.
- Tutorial Post 19: Table of Contents. (THIS PAGE)
- Tutorial Post 20: Using IndexedDB.
- Linking MKI3D stages into webs of stages
Sunday, August 6, 2017
Tutorial Post 18: Exporting as interactive HTML pages.
You can export your data to HTML page with interactive presentation of your 3D design in browsers with WebGL enabled. (Most of the modern browsers on modern devices have WebGL enabled.) You can rotate the object by mouse dragging and perform some other actions.
On the File Menu (invoked with key sequence: 'QF') you may notice the following fragment:
Notice the 'NOTE ON EXPORTING'. The exported HTML pages contain the data, but they also need a script mki3d_view.js to be placed in the same folder. (Any folder with a collection of exported pages needs to contain one copy of this script.)
If you press the 'E' key on the file menu, then mki3d starts exporting.
Exporting is similar to ordinary saving:
The script mki3d_view.js has been updated recently to handle touch events, so the exported designs can be interactively viewed also on the mobile devices.
Exporting of the stereoscopic views is not implemented yet. (It is a 'future work' ;-)
In the current version (since 2017.08.11) you can also export in the red-blue stereoscopic mode.
CLICK HERE TO SEE EXPORTED EXAMPLE. |
- CLICK HERE TO SEE INDEX FILE WITH LINKS TO MORE EXPORTED EXAMPLES.
- CLICK HERE TO SEE RED-BLUE STEREOSCOPIC EXPORTED EXAMPLES.
On the File Menu (invoked with key sequence: 'QF') you may notice the following fragment:
Notice the 'NOTE ON EXPORTING'. The exported HTML pages contain the data, but they also need a script mki3d_view.js to be placed in the same folder. (Any folder with a collection of exported pages needs to contain one copy of this script.)
If you press the 'E' key on the file menu, then mki3d starts exporting.
Exporting is similar to ordinary saving:
- If you are using mki3d as a Chrome application, then you are presented with file chooser for saving the exported page.
- If you are using mki3d in a browser, then you are presented with with a Text Save Page where the text of the exported page is placed in OUTPUT TEXT AREA, but you can also save the file with file chooser by using artificial DOWNLOAD LINK TO SAVE DATA:
The script mki3d_view.js has been updated recently to handle touch events, so the exported designs can be interactively viewed also on the mobile devices.
In the current version (since 2017.08.11) you can also export in the red-blue stereoscopic mode.
Friday, August 4, 2017
Tutorial Post 17: Constructing regular icosahedron.
In the tutorial post about folding, we constructed regular tetrahedron. That was easy: we aligned two equilateral triangles to the sides of another one and folded them to obtain all the needed endpoints.
Now we show how to construct regular icosahedron.
Create two copies of equilateral triangles (as it was made in the folding post) and one outline of regular pentagon. Select the enpoints of the pentagon and set constructive points for scaling the pentagon so that its side will become as long as the side of the triangles.
Invoke scaling with the key sequence 'QMS1'.
Prepare for alignment of the first triangle to the side of pentagon with a three-points transformation. The constructive points may be set as on the following figure:
Invoke the three-points transformation (key sequence 'QMT').
The same way, align the second triangle to the adjacent side of the pentagon:
Now we have to prepare the folding. Fortunately, each triangle is in a distinct set, so we can use the 'N' key to select the set and key sequence 'QSS' to select (and then also bookmark) the traingle.
The constructive points for folding should be set as follows:
After folding ('QMF') you should have something like that:
I have also set light ('QDL') to have different shades on the triangles.
Using cursor jumping, insert the remaining sides of the pentagonal pyramid:
Now we could safely remove the segments, which are the outline of the pentagon, but we will leave them to make the placement of pryramids more visible in the remaining stages.
Now select everything ('QSX'). Extract the selected vertices to a single set ('QSE') and make three copies of the pyramids:
We still need one more triangle. We could have made one more copy at the begining, but we are adding it now:
We have to align two of the pyramids with the triangle using three-points transformations:
Prepare for folding of the aligned pyramids:
After folding you get something like that:
We have to append the last pyramid to our construction. Prepare for three-points transformation:
And execute the transformation. The pyramid has been placed as on the view below:
The construction is almost ready. Remainig triangles can be inserted by cursor jumping to the existing endpoints:
To make the construction balanced we can select all endpoints ('QSX') and remove all segments, which are the outlines of the pentagons ('QD4').
Then
- Move the cursor to the centroid of the selected endpoins (which is now the center of the icosahedron) with key sequence 'QMJC'.
- Set the constructive point 'A' ('QPSA')
- Using INPUTS PAGE ('QI') set cursor's X,Y,Z coordinates to zeroes.
- Set the constructive point 'B' ('QPSB')
- Move the (still selected) endpoints by the vector 'AB' (key sequence 'QMM0')
Click to see exported to html |
Wednesday, July 12, 2017
Tutorial Post 16: Folding.
Folding is a constructive method that makes two rotations of two disjoint sets of endpoints at once.
The inputs of folding operation are:
The lines 'AB' and 'AC' are axes of two rotations, such that the half-line 'AD' rotated by the first rotation around the line 'AB' is equal to the half-line 'AE' rotated by the second rotation around the line 'AC'.
Such rotations may not always exist. (It depends on the angles between the half-lines.)
As a simple example, let's make regular tetrahedron.
First make equilateral triangle:
Then make two copies of the triangle:
(I have also painted them with different colors.)
Then you can use two three-point transformations to align the triangles as follows (use cursor jumping ('QCJ') to set the input constructive points of the three-point transformations):
Use selecting and bookmarking to bookmark the red triangle and to select the green triangle and use cursor jumping ('QCJ') to set constructive points as follows:
Do folding ('QMF'):
The red and the green triangles have been folded around 'AC' and 'AB', respectively.
Note the point 'V' that is set by folding to denote the half-line 'AV' that is equal to the rotations of 'AD' and 'AE'.
There is still one face missing:
We can add it manually with cursor jumping to the existing endpoints:
The Folding Algorithm (formally derived here) does not use any trigonometric functions, which should have positive impact on the precision of computations.
The inputs of folding operation are:
- four half-lines with a common initial point 'A': 'AB', 'AC', 'AD' and 'AE', and
- a point 'F' on one side of the plane 'ABC' indicating the direction of the rotations.
The lines 'AB' and 'AC' are axes of two rotations, such that the half-line 'AD' rotated by the first rotation around the line 'AB' is equal to the half-line 'AE' rotated by the second rotation around the line 'AC'.
Such rotations may not always exist. (It depends on the angles between the half-lines.)
As a simple example, let's make regular tetrahedron.
First make equilateral triangle:
- Set 3 as the NUMBER OF POLYGON VERTICES on the inputs page
- Insert outline of regular polygon ('QMI3')
- Using cursor jumping ('QCJ') to the endpoints of the outline, insert a single triangle
- Select all vertices ('QSX') and remove the segments of the outline ('QD4')
Then make two copies of the triangle:
(I have also painted them with different colors.)
Then you can use two three-point transformations to align the triangles as follows (use cursor jumping ('QCJ') to set the input constructive points of the three-point transformations):
Use selecting and bookmarking to bookmark the red triangle and to select the green triangle and use cursor jumping ('QCJ') to set constructive points as follows:
Do folding ('QMF'):
The red and the green triangles have been folded around 'AC' and 'AB', respectively.
Note the point 'V' that is set by folding to denote the half-line 'AV' that is equal to the rotations of 'AD' and 'AE'.
There is still one face missing:
We can add it manually with cursor jumping to the existing endpoints:
The Folding Algorithm (formally derived here) does not use any trigonometric functions, which should have positive impact on the precision of computations.
Monday, July 3, 2017
Tutorial Post 15: Sets.
As noted in Tutorial Post on Data Organisation, each endpoint has a set attribute. Endpoints are grouped into disjoint sets. The set attribute is just an index of the endpoint's group. There is also a 'current set index', which indicates one of the set indices.
Sets are useful for logical grouping of the endpoints.
Set Menu is invoked by key sequence: 'QN'
I this menu you can change the current set and restrict visibility to the elements that have all the endpoints in (are included in) the current set or to the elements that have at least one endpoint in (are incident to) the current set.
In the example we have copied two white segments from set 0 (with segment glues between endpoints).
The copy has been moved and painted red.
The copied endpoints have been automatically placed in new set (set 1).
The endpoints of set one have been selected with key sequence 'QSS', when the current set index was 1, and then bookmarked with 'QSB'.
Then the current set index was changed to 0 (by repeating 'QNN') and the endpitoints of set 0 (current set) have been selected ('QSS').
After pressing 'QN0' we would see the elements included in current set:
If we pressed 'QN1' then we would see the elements incident to the current set:
(Note that now the glues are also visible.)
We can also display some statistics with 'QNP':
You may also cycle with through the available set indexes and view restrictions, by pressing just the key 'N'.
Note that the set attributes of the endpoints may change their values while you are not watching, since mki3d tries to minimize the total number of available set indexes, by ensuring that the only index of an empty set is the maximal index. After all, the set attributes are only used to indicate the partitioning of the endpoints, and we do not want to cycle through many empty groups, nor to remember the index numeric values.
Sets are useful for logical grouping of the endpoints.
- If the endpoints from different sets have the same position, then you can select only endpoints from the current set by pressing: 'QSS' ("ADD ENDPOINTS FROM THE CURRENT SET TO SELECTION" on Selection Menu).
- On the other hand, if you have some endpoints selected, then you can create a new set that contains only the selected endpoints, extracting them from their old sets ('QSE') ("EXTRACT THE SELECTED ENDPOINTS TO A NEW SET" on Selection Menu).
- If you created the copy of selectde endpoints ('QDC...'), then the copies of the endpoints are placed in a new set. (The glue elements have endpoints in distinct sets.)
- If you merge from a file ('QFM') then the sets of the merged endpoints are separate from the existing sets (while all the merged endpoints are selected and you can extract them to a single set if you wish)
Set Menu is invoked by key sequence: 'QN'
I this menu you can change the current set and restrict visibility to the elements that have all the endpoints in (are included in) the current set or to the elements that have at least one endpoint in (are incident to) the current set.
In the example we have copied two white segments from set 0 (with segment glues between endpoints).
The copy has been moved and painted red.
The copied endpoints have been automatically placed in new set (set 1).
The endpoints of set one have been selected with key sequence 'QSS', when the current set index was 1, and then bookmarked with 'QSB'.
Then the current set index was changed to 0 (by repeating 'QNN') and the endpitoints of set 0 (current set) have been selected ('QSS').
After pressing 'QN0' we would see the elements included in current set:
If we pressed 'QN1' then we would see the elements incident to the current set:
(Note that now the glues are also visible.)
We can also display some statistics with 'QNP':
You may also cycle with through the available set indexes and view restrictions, by pressing just the key 'N'.
Note that the set attributes of the endpoints may change their values while you are not watching, since mki3d tries to minimize the total number of available set indexes, by ensuring that the only index of an empty set is the maximal index. After all, the set attributes are only used to indicate the partitioning of the endpoints, and we do not want to cycle through many empty groups, nor to remember the index numeric values.
Tutorial Post 14: Copying.
We can make copies of selected elements. We will make a copy of the two red segments.
The segments already have been selected (with a key sequence: 'QSX').
We invoke Copy submenu on Data Menu (key sequence: 'QDC'):
Note that there are four kinds of copying. The term 'GLUE' denotes connection between the original and its copy. A segment's endpoint can be connected with its copy by a segment. A segment can be connected with its copy by two triangles. There is no 'GLUE' option defined for a triangle and its copy. (In most cases you do not want glues between triangles and their copies!)
First, lets make the copy without any 'GLUE' ('QDC0').
The endpoints have been copied and placed in a new (unused) set. The old endpoints are un-selected and their copies are now selected. The copies are placed in the positions of the originals. To see that we have really made a copy, select action 'SELECTION MOVE' (key sequence: 'AS') and move the selected copy with arrow keys.
Now, lets make copy of the first copy with the glues between the endpoints ('QDC1') and move the selected new copy with arrow key to see the results:
And finally, lets make a copy with glues between the segments ('QDC2') and move the copy:
The key sequence: 'QDC3' would make another copy with both kinds of glues.
The segments already have been selected (with a key sequence: 'QSX').
We invoke Copy submenu on Data Menu (key sequence: 'QDC'):
Note that there are four kinds of copying. The term 'GLUE' denotes connection between the original and its copy. A segment's endpoint can be connected with its copy by a segment. A segment can be connected with its copy by two triangles. There is no 'GLUE' option defined for a triangle and its copy. (In most cases you do not want glues between triangles and their copies!)
First, lets make the copy without any 'GLUE' ('QDC0').
The endpoints have been copied and placed in a new (unused) set. The old endpoints are un-selected and their copies are now selected. The copies are placed in the positions of the originals. To see that we have really made a copy, select action 'SELECTION MOVE' (key sequence: 'AS') and move the selected copy with arrow keys.
Now, lets make copy of the first copy with the glues between the endpoints ('QDC1') and move the selected new copy with arrow key to see the results:
And finally, lets make a copy with glues between the segments ('QDC2') and move the copy:
The key sequence: 'QDC3' would make another copy with both kinds of glues.
Monday, June 12, 2017
MKI SEARCHING GAME with MKI3D stages
MKI SEARCHING GAME has been updated in so that it uses directly the stages designed with MKI3D. (All that is needed is to design the stage, place it in proper sub-directory and update the file with the index of the stages).
If you want to design your own stages, then clone the GitHub repository of the game with a git command:
Here is a recent screen-cast on YouTube with some stages:
If you want to design your own stages, then clone the GitHub repository of the game with a git command:
git clone https://github.com/mki1967/mkisg-chrome.git
and follow the instructions in README.md.Here is a recent screen-cast on YouTube with some stages:
UPDATE: The game version at:
has touch events implemented and can be played in a browser on mobile device.
Saturday, May 13, 2017
Testing distribution on SourceForge and Bintray (Linux)
Update:
I have placed on SourceForge the compiled binary executable for linux-amd64 of mki3dgame version 1.0 (now updated to version 1.1, with a version for windows_amd64 added)
Now I have placed my first AppImage of the Linux version of the game.
AppImage bundles the executable program with its data (game assets).
You can find more informations about AppImage on the following pages:
All you have to do is to download the file, change its mode to executable:
$ chmod a+x mki3dgame-x86_64.AppImage
and just run it:
$ ./mki3dgame-x86_64.AppImage
(If you do not care for text messages printed in the terminal, then you can also start the application by clicking on the executable file in a file manager.)
Also available on Bintray :
Now I have placed my first AppImage of the Linux version of the game.
AppImage bundles the executable program with its data (game assets).
You can find more informations about AppImage on the following pages:
All you have to do is to download the file, change its mode to executable:
$ chmod a+x mki3dgame-x86_64.AppImage
and just run it:
$ ./mki3dgame-x86_64.AppImage
(If you do not care for text messages printed in the terminal, then you can also start the application by clicking on the executable file in a file manager.)
Also available on Bintray :
Subscribe to:
Posts (Atom)