Results for "Author: robert rayment"
Color Selector by Robert Rayment. Select a color from a list of 140 named colors or from an RGB gradient display. Color info to clipboard. Form location in ini file. Color names from www.learningwebdesign.com/colornames.html. Addition 12 July: Added, by request, spectrally sorted colors (empirical).... Change 13 July: Better Darker/Brighter action.... Additions 15 July: Added system color dialog & closest web-safe colors. Apart from any mistakes this is surely now finished! See Form1 for all updates. Zip 18 KB.
Linear Transforms by Robert Rayment... Shows mapping a rectangular image onto a quadrilateral, circle, cylinder, cone and a sphere... This is re-worked from an old program of mine to speed it up and make more re-useable... Note that for the cylinder, cone and the sphere the image is only partly wrapped around... Five images are included... Only tested on Win XP... (Update 23 Jan 08)... Some redundant maths lines removed...(Update 25 Jan 08)... Simplified CommonDialog info and indicated where color bytes could be manipulated...Zip 185 KB.
TinyGFX32 by Robert Rayment. (Update 25Jul2012.. 1. Avoid rare RTE for miss-match when Extracting some non-standard icons...2. Added new shade Tool. See TinyGFXUpdate.txt for other changes)....Program to make small bitmaps, icons and cursors - 1 x 1 to 64 x 64.... NOTE if the tinygfx.chm help file doesn't work with the program, open it on it's own, uncheck the security button and open.
Demo of 32bpp bitmap by Robert Rayment. Simple demonstration of manipulating a 32bpp BMP file. Zip 83 KB.
Particle Effects Demo by Robert Rayment (Update 10Jun08). Demonstration of a particle engine with various effects. Note that the green and white particle emitter can be moved around with the mouse. Also any pictures opened are auto-sized to a fixed display size... Update 10 Jun: Minor update to Sound ON/OFF caption which was reversed. Zip 135 Kb.
Elemental NASM.(UPDATE Now works on Win2000 and Probably WinNT) The zip file is ~ 26KB
A386 machine code collection by Robert Rayment. 1. Simple examples 2. Fractals. 3. PicBox1 4. PicBox2. All using the A386 assembler. Win 98, Zip 173 KB
Creating & testing an assembler DLL using NASM, a freeware assembler. The demonstration DLL does Bit testing, shifting, rotating, clearing & setting.
Finds words starting with, containing, ending with, >
I love pencil drawing and there's nothing to beat pencil and paper. On the computer the mouse never moves as easily as a pencil but mathematics does allow some types of drawing to be carried out much more quickly than would be possible by hand. This is a pencil drawing programme with 256 shades of grey. It has 21 drawing tools and a host of sub-tools all easily selected from on-screen toolbars. Many shaded shapes such as curved lines, tubes, cones etc can be drawn. All the standard picture formats can be loaded or added and re-positioned. Saving is either as a BMP or a JPG file. Any rectangular part of the picture can be saved. JPG saving and printing is accomplished by using a single exe, free-standing, freeware conversion program that takes a command line and is hence easily used in VB. The source and credits for this are included in the .zip file In addition to the tools there is a zoom facility, whole-picture scrolling, +, X & perspective hair-lines, settable brick & tile sizes, text with any font, size or angle, undo and two canvas sizes suitable for A4 paper. All the source files, including button bitmaps, are included. The .zip file is just over 1MB and the program is written for an 800x600 screen.
RR3D: Displays a rotatable and scaleable wire frame of any 3D mathematical function. This can be made up from the normal VB maths plus inverse and hyperbolic functions. Functions can be created and saved as wanted. Image vertices can also be saved for use elsewhere. The MS ScriptControl Eval function simplifies calculations enormously and its use is demonstrated. Also shown are MoveToEx, LineTo which are much faster than the VB equivalents and very easy to use. Included are a set of string handling subroutines such as count characters, squeeze out spaces, replace sub-strings etc. Commented throughout including the 3D maths and perspective methods. All the files are visible and the program is written for an 800x600 screen.
16 Million Colors DLL. Example of a straightforward DLL, written with NASM, to cycle through all possible colors quickly. For 24-bit color only. All source code included. Zip file 8.5KB.
VB, Assembler & Resource files by Robert Rayment (see small update below) Only those interested in this topic should download these files. If you have been following some of the VB+assembler progs I've been putting on PSC you may have noticed that the assembly part is either in a bin file (com in earlier examples) or in a DLL. The disadvantage of both these is that they need to be in the same folder as the prog. This is OK for testing but is a nuisance for an EXE. Also we're usually talking about small bits of assembler to beef up parts of VB (Heineken approach). The DLL may be specific and so is not appropriate to register. Assembled snippets are often much faster than VB. Also, once you've got over the red-tape and peculiarities of the particular assembler, its often _easier_ (this may be a secret so don't tell anyone) A DLL has a minimum size of 16KB and a bin file 4KB (cluster size). What this submission shows is how to put your assembler code into a resource file which gets incorporated into an EXE freeing it from associations and only taking a few more bytes than the bin file size. A 32-bit Hex/Long integer/Binary converter is developed to demonstrate these techniques. The zip file is ~11KB. UPDATE: it is possible to simplify the load from res by InCode = LoadResData(101, "CUSTOM") lpMCode = VarPtr(InCode(0)) avoiding the save to disc. Make sure to delete the line lpMCode = VarPtr(InCode(1))
VTrack2 by Robert Rayment This program uses floor ray-casting from the eye onto a color-height byte array (ie for simplicity avoiding separate height & color maps). The color-heights are then projected back to a front surface byte array which blitted to the screen using the API StretchDIBits. The program can be run with or without machine code and it runs for any screen size or color setting There is an automatic mode which goes round a track once with timing. In the VB environment this takes about 300 secs, VB EXE takes between 35 and 65 secs depending on Voxel heights and machine code bewteen 12 and 24 secs on my 400 MHz computer. Controls are the cursor keys to move forward, backward, turn to the left and turn to the right. With Shift the up & down arrows change the height of objects and Ctrl with the up & down arrows moves the viewer up & down. The SPACE bar brings the motion to an immediate halt. With the Pyramids a wall forms a boundary around the surface but with Plasmas the surface rolls over giving continuous motion. There is also collision detection based on the eye coords and the Voxel height in the vicinity on the floor surface. Different palettes can be selected and they take effect immediately. Changing the motion control or surface type requires the START button to be pressed. The casting routine is modified from that of D Brebner's of Unlimited Realities. In particular a spherical correction is applied and the scanning is from -ve to +ve angles placing the viewer in the middle of the screen. The FloorCASTER routine is commented in detail - the effects are very subtle. The machine code routines are in a bin file for use with CallWindowsProc but could easily be converted to a DLL. See also the recent prog from NLS, on PSC, which shows an alternative method for Voxels with 24-bit color. The ZIP file is 40 KB. (ADDITIONS Switch smoothing, plateau surface, collision flash, no collision in clouds).
A Dash Through the Woods by Robert Rayment. UPDATE: Improved bitmap creation (Having been goaded by Paul) plus some simple sound. This prog is based on the triplet StretchDIBits, byte arrays and assembler (as with 'Tunnels & Things' which got 10 excellent votes) except I've left out the assembler which means that it MUST be compiled so that the array manipulations are again dealt with by machine code. The prog will only produce a large bitmap file of smaller trees from a starting bitmap ONCE so that later runs can load up the byte arrays quickly. The creation of the bit maps is fast enough now so you could leave out the save to disk if you wanted to. It shows some other uses for StretchDIBits and 8-bit color byte surfaces, which might be of interest to some of you. No assembler is used. Trees are then put onto a drawing surface starting with the smallest and ignoring a white surround (masks not needed). By keeping and adjusting the x-position, direction and type of tree it looks like moving through some woods. Timing (using GetTickCount) and hence speed, the number of tree starts and their spread are on an options menu. The left & right cursor moves a little car to the left & right (actually the trees move in the opposite direction) and the up & down cursor changes the speed. You have to try not to hit the trees. Collision detection is based on x-coords. It needs compiling to an EXE to get a decent speed. Don't expect DirectX quality but I think its fun! The Zip file is 54 KB.
Spirals by Robert Rayment. Chris and I were looking at some spirals and I've animated a few for your pleasure (if you like that kind of thing!). See 'Tunnels & Things' for the techniques. Win98 only. Zip file 24 KB.
Tunnels & Things by Robert Rayment: The simplicity of this appeals to me. Draw to a byte array and blit it to the form using StretchDIBits. The advantage of StretchDIBits is that it can take a pointer to the byte drawing surface and to a palette. It can be as close as VB gets to direct screen addressing similar to the old DOS Screen 13, only better. It is no competitor to DirectX but is very much simpler and pretty fast. The demonstration shows various tunnels, MMX scrolling, Plasma, Fire etc. Drawing is done using VB and animation using assembler (assembler doesn't have to be used but I prefer it). Win98 only. Zip file is 63KB.
File Format Viewer & Editor (FFVe) by Robert Rayment. (Update 6 Apr 2008) The purpose of this program is to be able to view any file, particularly binary files, in an easily read format, ie as characters, bytes, integers and longs as decimal or hex. Format changes are set out on a new line with different colors and can be saved in a template file. Also loading in a template file will automatically parse the display. Numbers or characters can be editted and the new file saved. There is unlimited undo. Search & Mark, Goto and Highlighting is included. The displayed page can be printed and placing a shortcut of the EXE in the Windows SendTo folder will enable any file to be sent to this program or dropped onto a DeskTop shortcut. Some simple samples (made with this program) for ico, cur, bmp, gif, png, jpeg and RIFF palette files are included. There is a DEMO button to show the main functions... __________________________________________________ Update 6 Apr:...Added variation to Slider, see screenshot. Plus a few other tweaks, see Form1. __________________________________________________ Upgrade 5 Apr:...1..Added ASCII Panel..2..Added Animated navigation..3..Added Slider for large files. __________________________________________________ (Update 1 Apr:.. Correct a zero divide error and allow for line numbers >= 10,000,000)...(Update 31 Mar:..Extended for higher screen resolutions). See Form1 for other changes. Zip 92KB.
Mini-Fractal Painter by Robert Rayment. (Correction for no drive) (Additions: Faster string-byte handling + DrawWidth) The starting point for this was Loreno Heer's LSystems prog on PSC, where the VB6 Replace function is used to develop the LSys strings. The trees' & plants' size, complexity, color & orientation can be varied. See screen shot which was made in just a few seconds. This prog could easily be extended to include other functions (I've resisted doing that and have only included those necessary to produce a picture like the screenshot) or the methods could be added to an existing VB paint program. VB or ASM can be used to translate the LSys strings and draw to the screen. Win98, Zip 55KB.
Plasma Tunnels by Robert Rayment. (Now maximizable) VB+ASM. Win98 (see Plasma Worlds for other uses of plasmas) Zip 27KB