Numbers Guessing Game
Your Numbers Game
Get
clueYour
answerYour
ScoreClue? Score 0/0
-
Recent Posts
- PHP Exif Quiz Geographicals Tutorial
- PHP Exif Quiz Tutorial
- PHP Exif Retention off iPhone Images Tutorial
- List to Grid Layout CSS Media Query Tutorial
- List to Grid Layout Primer Tutorial
- Out and About WordPress Blog Content Tweaks Just with iPhone Tutorial
- Command Line History By Date Tutorial
- Overseas Travel Global Roaming Mobile Primer Tutorial
Categories
- Ajax
- Android
- Animation
- Anything You Like
- Code::Blocks
- Coding
- Colour Matching
- Data Integration
- Database
- Delphi
- Eclipse
- eLearning
- ESL
- Event-Driven Programming
- Games
- GIMP
- GUI
- Hardware
- Installers
- iOS
- Land Surveying
- Moodle
- Music Poll
- NetBeans
- Networking
- News
- Not Categorised
- OOP
- Operating System
- Photography
- Projects
- Signage Poll
- Software
- SpectroPhotometer
- Tiki Wiki
- Trips
- Tutorials
- Uncategorized
- Visual Studio
- Xcode
Meta
Tags
Ajax animation background button canvas command line CSS Did you know DOM dropdown email emoji event form game Google Google chart hashtag HTML IFRAME image iOS Javascript MAMP media mobile navigation onclick overlay PHP popup programming select share sharing SMS SVG table text textarea tutorial url video web browser webpageYour Background Image
OnTopList
Tag Archives: geometry
WebGL Prism Canvas Email Tutorial
Today we’re revisiting our “Convex Polygon shape with an added dimension by displaying its 3D prism equivalent via the WebGL API scenario”, we last talked about with PHP and Javascript and CSS WebGL Prism Tutorial as shown below. We revisit with a view to … make it more aesthetically pleasing, we hope centre the main graphical elements of the web application when unsupervised and avoid our old “sinful” align=’center’ “habit” usage we talked about at W3C XHTML Nu Checker Validation Primer Tutorial going on, which we diligently changed to style=” width:100%;text-align:center; “ here today … when unsupervised, but … left justify the main graphical elements of the web application when supervised, so this involved detecting “supervision” and Javascript DOM changes at … window.onload = function init() { if (document.URL.indexOf(‘huh=’) != -1 || parent.document.getElementById(‘glcanvas’) != null || (document.referrer.indexOf(‘/HTMLCSS/ShapeDraw’) != -1 && document.referrer.indexOf(‘.htm’) == -1)) { document.getElementById(‘myform’).innerHTML+='<input type=hidden name=huh value=></input>’; document.getElementById(‘mydiv’).style.position=’absolute’; document.getElementById(‘mydiv’).style.top=’0px’; document.getElementById(‘mydiv’).style.left=’0px’; document.getElementById(‘mydiv’).style.width=’300px’; document.getElementById(‘mydiv’).style.textAlign=’left’; document.getElementById(‘mydiv’).innerHTML='<canvas id=”gl-canvas” width=”300″ height=”300″></canvas>’; document.getElementById(‘mydiv2′).style.position=’absolute’; document.getElementById(‘mydiv2′).style.top=’310px’; document.getElementById(‘mydiv2′).style.left=’0px’; document.getElementById(‘mydiv2′).style.textAlign=’left’; document.getElementById(‘mydiv3′).style.position=’absolute’; document.getElementById(‘mydiv3′).style.top=’330px’; document.getElementById(‘mydiv3′).style.left=’0px’; document.getElementById(‘mydiv3′).style.textAlign=’left’; } else { document.getElementById(‘mydiv’).innerHTML='<canvas id=”gl-canvas” width=”400″ height=”400″></canvas>’; } canvas = document.getElementById( “gl-canvas” ); // more follows … adding new Email functionality via mailto: tags linking to the user’s default Email client program, featuring the ability to … have the body section of that email be able to have a clipboard image pasted into it, for which we can utilize HTML5 canvas element’s toDataURL() method, teamed up with a window.open popup window of the toDataURL image data, which can be selected and copied, optionally, by the user themselves, should they wish this to make their email more self explanatory … and that canvas element’s “meeting of minds” with WebGL changing as per … gl = WebGLUtils.setupWebGL( canvas, {preserveDrawingBuffer:true} ); … the help for which we got great ideas from this useful link, thanks, and which allows the canvas element content to be retained long enough to be available for the toDataURL() call of it As we’ve said before about email, as a communication tool, its use can add a lot of accountability to your web applications, as well as being a great “sharing” method. So please feel free to try … an unsupervised live run a supervised live run HTML and Javascript and CSS (supervised) webgl_test.html … changed in this way … PHP (supervisor) ShapeDraw.php is unchanged see today’s tutorial picture up close When will we see you … again … da, da da, da da?
Posted in eLearning, Event-Driven Programming, GUI, Software, Tutorials
|
Tagged animation, API, CSS, email, geometry, HTML, HTML5, Javascript, Land Surveying, lighting, mathematics, perspective, programming, render, tutorial, WebGL
|
Leave a comment
ESL Vocabulary Getting Warmer Image Tutorial
Our last visit to our series of HTML map element tutorials, today, building on yesterday’s ESL Vocabulary Getting Warmer Game Tutorial as shown below, concentrates back on the HTML img element that the HTML map element relies on. The reason for this, is that, today, we allow for the “scene” of the ESL Vocabulary lesson to change, and we need to resize things, but not to do with any HTML map element dimensions, but rather the underlying HTML img element’s Javascript DOM … document.getElementById([imgId]).width document.getElementById([imgId]).height … at which point you might be saying … doh! … and you might be right “doh”ing in such a Willy Nilly way … but in lots of other applications it is document.getElementById([imgId]).style.width and document.getElementById([imgId]).style.height you deal with. All this begs the question: “How did you create the HTML map elements in the first place?” … especially as the “first place” was “Under the Stairs” … and there’s not much room there? … very minor and lame chortle, chortle. Well, this tutorial wants to introduce (or reintroduce) you to a wonderful service run by mobilefish to help you out … all together now … thanks MOBILEFISH … take a look here … can you see the possibilities?! We, personally, revisited the wonderful Mobilefish website, to create a Where’s Wally “scene” (thanks to the Telegraph UK’s “Where’s Wally? celebrates 25th birthday” article’s image of this webpage) for you to try the second of the HTML map modes of use we have been raving about lately as per … a jigsaw “overlay” to the underlying image (in that we try to cover the whole area of the image with clickable HTML area “polygon” segments (the so called “Click and be Prompted” mode of use)) … but if the user selects a “Find Prompted Object” mode of use that same HTML map element is reworked to become like … a “Where’s Wally” scenario where the computer prompts the user for what they should click on, where the HTML map element has one defined HTML area tag plus one other default “nonhref” HTML area tag … and there … we hope you see how the “Getting Warmer” is very applicable as an idea. By the way, you will see out there in Open Source land places where you can get great Javascript libraries whose code would cover what you need here too. So think “overlay”, the HTML map tag
Posted in eLearning, ESL, Games, Tutorials
|
Tagged CSS, ESL, game, games, geometry, HTML, IFRAME, Javascript, map, mathematics, overlay, programming, tutorial, vocabulary, word game
|
Leave a comment
ESL Vocabulary Getting Warmer Game Tutorial
As we saw yesterday, the HTML map element can be used in a variety of ways, two of which we hone in on with today’s ESL Vocabulary Getting Warmer Game Tutorial, a variation on yesterday’s ESL Under The Stairs Game Overlay Primer Tutorial as shown below, where we add Javascript functionality to effectively find the shortest distance of a point to a polygon co-ordinate “set”, and a revisit of our previous English Learning – Vocabulary – Under The Stairs as shown way below. The HTML map element can be … a jigsaw “overlay” to the underlying image (in that we try to cover the whole area of the image with clickable HTML area “polygon” segments (the so called “Click and be Prompted” mode of use)) … but if the user selects a “Find Prompted Object” mode of use that same HTML map element is reworked to become like … a “Where’s Wally” scenario where the computer prompts the user for what they should click on, where the HTML map element has one defined HTML area tag plus one other default “nonhref” HTML area tag In that second mode of use today, we add a bit of fun by adding that “getting warmer” type of “bizzo” (sorry to get technical) to our game. To do this, as we’ve mentioned, we find the shortest distance of a point to a polygon co-ordinate “set” by … leave the HTML map to determine when a point is inside its first “polygon” section, and for all the rest, via that other “nohref” HTML area element’s onclick event, we arrange some Javascript that … breaks the problem into sets of 3 co-ordinate (x,y) arrangements for each polygon line segment (brought up to 3 by the point chosen by the user) … for each of these consider the three points as a triangle and use Heron’s Formula to calculate the triangle area function herons_formula_triangle_area(x1, y1, x2, y2, x3, y3) { var a=Math.sqrt((x1 – x2) * (x1 – x2) + (y1 – y2) * (y1 – y2)); var b=Math.sqrt((x3 – x2) * (x3 – x2) + (y3 – y2) * (y3 – y2)); var c=Math.sqrt((x3 – x1) * (x3 – x1) + (y3 – y1) * (y3 – y1)); var s=eval((a + b + c) / 2.0); return Math.sqrt(s * (s – a) * (s – b) * (s – c)); } … the base value in “area=base
Posted in eLearning, ESL, Games, Tutorials
|
Tagged CSS, ESL, game, games, geometry, HTML, IFRAME, Javascript, map, mathematics, overlay, programming, tutorial, vocabulary, word game
|
10 Comments
HTML/Javascript Canvas Geometry Tracing Game Tutorial
The Canvas HTML element tag can be used as the container to draw graphics on the fly usually via the use of Javascript functions for rendering and event management. In today’s tutorial we mainly use the drawImage and lineTo functions to create a webpage where you can draw lines tracing existant images shown on the canvas. This game illustrates the mapping skill known as hard copy digitising, and though the author claims no expertise here, you score better if you digitise the same way, because the amount out you are will determine how much is taken off your score in a survival game … the longer you survive with a positive score the better you are. As a note, if your digitising is diabolically bad, it could be a zooming issue! With the ellipse and the circle you need to close close to your starting point to get your digitised area evaluated. You may want to read more at HTML Canvas Reference as a generic reference, or here, at the tutorial javascript – How do I add a simple onClick event handler to a canvas element? – Stack Overflow. You may notice several similarities thinking about today’s tutorial “workings” to that of yesterday’s HTML/Javascript Canvas Slope of a Line Primer Tutorial, three of which we’d like to focus your attention on … both use an HTML canvas positioned, nominally within the second column, second row of an HTML table element’s HTML td “cell” (all overseen by an HTML div element horizontally centrally aligned), yet the HTML canvas uses position:absolute; with numerically specified top: and width: and height: but percentage specified left:50%; … why? … to allow for a canvas element not tucked up in the top left corner, but positioned where the table cell would be anyway (and where users are probably more comfortable seeing it), yet … both web applications use co-ordinates, used in the context of the functionality of the HTML canvas element, where it is not important “absolutely” … we only need to know co-ordinates “relatively” to achieve the functionality we set out to achieve, but must retain “scale” to be functional, so … the onresize event can be handled by restarting the web application via location.href=[URL_of_web_application]; and the left:50%; is “reworked” for the new window width that results … as it may be unusual to see a position:absolute; scenario not having all numerically specified top:s and
Posted in eLearning, Event-Driven Programming, Land Surveying, Tutorials
|
Tagged area, canvas, co-ordinates, CSS, digitizing, game, games, geometry, HTML, Javascript, Mapping, mathematics, onresize, overlay, programming, tutorial
|
9 Comments
HTML/Javascript Canvas Slope of a Line Primer Tutorial
The Canvas HTML element tag can be used as the container to draw graphics on the fly usually via the use of Javascript functions for rendering and event management. In today’s tutorial we mainly use the lineTo function to create a webpage where you can draw lines on a canvas and determine the slope of that line. In trigonometry (and Land Surveying) the slope of a line is of great interest. Pretty obviously water doesn’t do very well flowing up against gravity (even with a stern talking to), so the Land Surveying skill called levelling is all about determining between two points what is the difference in the Z co-ordinate. Take a ratio of what this change is compared to the horizontal distance between those two points is on a horizontal plane (maybe known via a previous survey traverse, or the one you did before or after the levelling … though it may be these days that geolocation can help with the (X,Y[,and perhaps the Z]) of these issues, to the point that flying crumbs from your “making breakfast in bed web application”, can be tracked and identified), and you have a measure of slope (up or down the proverbial hill or molehill). Quite often in mathematics, or geometry, we are interested in the 2D horizontal plane only, and describe the slope as the ratio between change in the Y co-ordinate over a change in the X co-ordinate (being careful to reference what is the first point and what is the second). And so today, we show you a web application exploring that … Slope = (Y2 – Y1) / (X2 – X1) … concept that you can also read about at Mathwords … thanks, heaps. You may want to read more at HTML Canvas Reference as a generic reference, or here, at the tutorial javascript – How do I add a simple onClick event handler to a canvas element? – Stack Overflow. As you can imagine, this HTML canvas element, new to HTML5, can be very useful for some practical client-side web functionality. Here is a link to some downloadable HTML programming code … rename to slope_of_a_line.html We hope you enjoy this Mathematical tutorial live run. If this was interesting you may be interested in this too.
Posted in eLearning, Event-Driven Programming, Land Surveying, Tutorials
|
Tagged canvas, co-ordinates, geolocation, geometry, HTML, Javascript, Land Surveying, levelling, mathematics, programming, slope, traverse, trigonometry, tutorial
|
13 Comments
PHP and Javascript and CSS WebGL Prism Tutorial
To infinity and beyond!! … well, at least to the 3rd dimension … yes, we’re rejoining our Geometry and Land Surveying theme today, rejoining the discussion of PHP and Javascript and CSS Shape Rotation Tutorial as shown below, but giving some additional functionality to show the Convex Polygon shape with an added dimension by displaying its 3D prism equivalent via the WebGL API, modelling the additional code via the public generosity and wonderful resources from the University of New Mexico … our heartfelt thanks. If you have been a recent reader you’ll have seen that we have been discussing OpenGL. OpenGL has a OpenGL.org landing page which will talk about all the platforms supported, and let’s just remind you about the purpose, with a quote from the webpage … The Industry’s Foundation for High Performance Graphics from games to virtual reality, mobile phones to supercomputers … well, today, we use some of that knowledge … some being the operative word, and we’ll talk more on this tomorrow, but … with the sequence of blog posts culminating in C++ OpenGL in Xcode Generic Regular Prism Drawing Tutorial we learnt some things about graphics software and the concepts of … object vertices definition object colour lighting … direction, type, angle, numbers of sources etcetera perspective … field of view, aspect ratio, Z position … and the Land Surveying use of thinking about Survey Traverses as an idea to genericize the vertex definition phase, as this is the major difference between drawing a “cube” or a “hexagonal prism” or a “butterfly in Brazil” (just kidding … that’s for tomorrow (in Klingon time)). So the wonderful code from the University of New Mexico (via StackOverflow) was to show a cube, and the use of buttons to display animation and rendering “smarts” … so am really really really keen for you to examine this additional HTML code of today you could call webgl_test.html … we change it to add some Land Surveying feeling to the creation of vertices for our Convex Polygon extended into a Prism arrangement as per the Javascript code … var numsides = location.search.split(‘numsides=’)[1] ? location.search.split(‘numsides=’)[1].split(‘&’)[0] : 4; var NumVertices = eval((numsides * 2) * 3); var evalc=””, evalcol=””; var delim=”[“; var sidelen=eval((1.0 * 3.0) / numsides); var x=eval(0.0 – (sidelen / 2.0) * (numsides / 3)), y=eval(0.0 – (sidelen / 2.0) * (numsides / 3)), z=1.5, otherz=0.5, thisis=1; var bearing=0.0; var
Posted in eLearning, Games, GUI, Land Surveying, Tutorials
|
Tagged animation, API, CSS, geometry, HTML, HTML5, Javascript, Land Surveying, lighting, mathematics, perspective, programming, render, tutorial, WebGL
|
19 Comments
C++ OpenGL in Xcode Generic Regular Prism Drawing Tutorial
In our search for a “C++ (Xcode IDE) OpenGL desktop application regular polygon drawer” (if anybody asks today what I do, that’s it, for the day), feel that they can’t channel the lyrics of Charlene this time, as we have some more generic offering today. We now have a hybrid of the wonderful Indiana State University Maths and Computing Department C++ code of yesterday (
Posted in eLearning, GUI, Operating System, Tutorials, Xcode
|
Tagged apothem, C++, geometry, graphics, hexagonal prism, lighting, Mac, Mac OS X, mathematics, OpenGL, perspective, programming, tutorial, Xcode
|
24 Comments
C++ OpenGL in Xcode Hexagonal Prism Tutorial
People think differently. People have reverence for different things. Some people do not like generalizations (“bye for now”). We like … associations linkages patterns creeping up on knowledge, especially if the subject matter is difficult … and so we proceed, on our quest, learning OpenGL … yesterday we drew a cube … yay!! … today a hexagonal prism … yayyyyyy!! … except those of you disappointed … why no genericity yet?! … and we say … We’re “creeping up on knowledge” … sssshhhhhh … and we’re aiming for some generic principles we can use with WebGL by looking at associations, linkages and patterns that we see (or get help from the web, seeing). So the great place that helped today was from Indiana State University Maths and Computing Department … thanks for being so public with your brilliance. This all being said, a large part of what this blog’s philosophy, concerning “learning”, involves revolves around (we hope) … self reliance (in an OpenSource world) being curious (about all publicly available software solutions) knowing how to look for information knowing where to look for information (we try to help, but this touches on “artistry”) … and knowing when something requires deep understanding, you know when to say … “I need to enroll in a course to get full understanding here” … else … we say there are a lot of things you can teach yourself. So the crux of the matter is, if you are on the same OpenGL quest as we are at the moment, go zooming ahead with your understanding should going from a “cube” to a “hexagonal prism” (with your OpenGL ideas today) give you enough clues, or take a look at the information we intend to peruse next, or enroll in a course, or look up more yourself with all those great “search” resources (eg. search engines) that exist on the World Wide Web. Have a look at the C++ programming source code you could call main.cpp of today. The C++ code above changed from yesterday as per main.cpp of today. Another “take home” from today’s tutorial may be that an IDE-style run of the C++ today in Xcode can still make use of command line arguments as per the image below, snapshotted after Product->Scheme->Edit Scheme… Word of the day Apothem OpenGL has a OpenGL.org landing page which will talk about all the platforms supported, and let’s
Posted in eLearning, GUI, Operating System, Tutorials, Xcode
|
Tagged apothem, C++, geometry, graphics, hexagonal prism, lighting, Mac, Mac OS X, mathematics, OpenGL, perspective, programming, tutorial, Xcode
|
12 Comments


Thanks. Since then, a Shower Songs project at https://www.rjmprogramming.com.au/HTMLCSS/shower_songs.html is an improvement regarding "Radio Play" on mobile platforms.