Advertisement

Results for "Author: robert rayment"

ASP_Volume2 #37526
VTrack

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).

ASP_Volume2 #37799
Extractor

Extractor by Robert Rayment. Extracts a band of colors from a picture and shows them on a black & white picture which can be saved as a 1-bpp bmp mask. Also can extract rectangles or shapes plus a mask or resize to a rectangle. ASM can be toggled for large pictures. Win98 (exe WinXP) Zip 110 KB.

ASP_Volume2 #38218
A Lotta Noise

"A Lotta Noise" by Robert Rayment: (UPDATE2 Cycle speed added) (UPDATE with faster linear Perlin & Marble) This is a demonstration of 32-bit StretchDIBits which can be run as VB code or VB + machine code. Perlin noise (Linear or Cosine-EASE), wood grain and marble surfaces can be designed on a picture box varying from 16x16 to 768x512 pixels. Color weighting, scales, wood and marble types, animated scales and color cyling can be done and the image saved, as a BMP, at any point. The prog can be run with any system color setting. A long integer graphic surface has the advantage in that it can more easily be dealt with using MMX. This demo is just the 'tip of the iceberg' but the method might be useful for designing textures for any application since the machine code is quite general and the bin file can be run locally. Zip file 38 kb.

ASP_Volume2 #38237
Anti-aliasing & Rotation demo

"Anti-aliasing demo" by Robert Rayment. There are a few anti-aliasing progs on PSC. Mostly they are cleverly convoluted into several subs. I thought I'd stretch out the logic - makes it easier for me to understand and maybe for some of you.

ASP_Volume2 #38953
Sphere (Updated)

Sphere by Robert Rayment. (Update with Latitude shift & Long for Byte Array) Demo of spherical wrap, rotate and tilt. Win98 (Zip 21 KB).

ASP_Volume2 #39140
Knob-Thumb-wheels & Skins

Knob-Thumb-wheels & Skins Demo by Robert Rayment. An earlier version has been deleted. Three programs. The first develops and tests bmp strips from a starting image where, for knob wheels the central rotating part's radius and incremental angle can be set as well as, for thumb wheels, number of repeated images. The second program makes compressed True Color 2D arrays of images and masks using zlib.dll (version 1.1.4.0 from www.winimage.com/zlibdll/). For most efficient inflating zlib needs the original uncompressed size. For pictures the original width and height are needed and this is stored at the beginning of the compressed picture array, from which the uncompressed size can also be calculated. The third program uses zlib.dll to inflate the images from a resource file. This is a headerless form, skin, controls & fonts resizing demo using some standard methods (plus some WAV sounds also in the resource file) - a test bed for trying out things. There are 2 full skins but the demo also stores some bitmaps in image boxes, which then serve as buttons and source for tiled skinning. When compiled all the images are then contained within the exe. See Notes.txt. (exe tested on WinXP Home) Win98 Zip 76 KB.

ASP_Volume3 #49453
MMX Crib (updated)

MMX Crib by Robert Rayment. (Updated 6 Mar 2006, tidy-up & added snippets) For those interested in mixing VB & assembler. Demonstrates all the MMX instructions plus a few snippets. Win98 (exe WinXP) Zip 18 KB.

ASP_Volume3 #49454
Sphere (Updated)

Sphere by Robert Rayment. (Update with Latitude shift & Long for Byte Array) Demo of spherical wrap, rotate and tilt. Win98 (Zip 21 KB).

ASP_Volume3 #49455
Despeckler (VB + MMX)

Despeckler by Robert Rayment.(Update Re-load added) This attempts to demonstrate some basic patching, dust & scratch removal, de-spotting, pixel painting, sharp, soft, dark & brightening for pictures. The operations can be for the whole picture or a selected area with varying blemish sizes and thresholds. Color selection and a magnifier help with correcting small areas. Example bitmaps are included. Can be run as VB or VB+ASM. The ASM makes extensive use of MMX. -------------------------------------------------- Optionally the use of i_view32.exe (freeware from www.irfanview.com) is demonstrated for loading and saving any image file format in VB....See Notes.txt. -------------------------------------------------- Thanks to VBAccelerator.com (Dialog class), VBSpeed (Timer class) and Ulli (ToolTips class - PSC CodeId=42051) (Exe tested on WinXP) Win98, Zip 205KB.

ASP_Volume3 #49456
Extractor

Extractor by Robert Rayment. Extracts a band of colors from a picture and shows them on a black & white picture which can be saved as a 1-bpp bmp mask. Also can extract rectangles or shapes plus a mask or resize to a rectangle. ASM can be toggled for large pictures. Win98 (exe WinXP) Zip 110 KB.

ASP_Volume3 #49457
Dither(Updated)

Dither by Robert Rayment. (Updated 26/11/02 Jump table used in ASM, 2-color saving corrected, improved scroll bars) This produces a 2-color bitmap from any original using a variety of methods and can be saved or printed. The program can be run in VB or VB+ASM. The structure of the asm file roughly follows that of the VB code and so should be useful for those new to assembler. The asm code is in a bin file but could be stored in a res file or made into a dll or a class (see buggy). See Notes.txt for more info. Zip 59KB, Win98 & exe tested on WinXP.

ASP_Volume3 #49458
Picture Collector

Picture Collector by Robert Rayment.(UPDATE with New Look dialog (Thanks redbird77) and maintain aspect ratio) (Upgraded for WinXP - thanks Carles) I had a request to write a quick program to collect a selection of picture files (standard VB ones) from a folder and save them as thumbnails to a single bmp. Shows multi-selection dialog and parsing input string and - might be useful - could be embellished. Win98 Zip 6 KB.

ASP_Volume3 #49459
Fast Bit-shifting Class Demo (Update)

Fast Bit-shifting Class Demo (Update + ASM files)by Robert Rayment. Thanks to David Fritts for highlighting this method on PSC (CodeId=45885). I've corrected the assembler and Ulli has recast it in his own inimitable style with some explanations. In fact the method is the self-same as that used by Dmitry (CodeId=11830) a few years ago. The main point is that, when comparing fast EXEs, this bitshifting class is over 10 times quicker than the standard VB way using functions of the form 2^p. This description is extended in Notes.txt.

ASP_Volume3 #49460
Fancy Scrollbars

Fancy Scrollbars by Robert Rayment. If wanted, the purpose here is to get away from the standard VB scrollbars and add other colors, shaping & effects. Lots of examples included to show almost unlimited design possibilities. One reusable bas Module provided & a set of short fixed Subs to include on the Form containing the scrollbars. No extra dependencies & just one recommended API (Sleep). Full instructions given. (exe WinXP) Win98, Zip 39 KB.

ASP_Volume3 #49461
Doodle Bytes (Updated)

Doodle Bytes by Robert Rayment. (Updated) This shows a variety of animations using the technique of drawing to a byte array and blitting to the screen with a palette. Win98 (exe WinXP) 14 KB.

ASP_Volume3 #49462
Layers Demo(Update5)

Layers Demo by Robert Rayment. (Update5 fileops correction) This started as a layers demo but grew a bit to include some effects and drawing tools. Individual pictures can be resized, clipped, lassoed, rotated have effects and drawn on and a merged picture can also have all these apart from lassoing and rotating. The transparency can be varied for each picture apart from the background...etc. Too many things to describe them all here so please read the Help. The screenshot was made with this prog but PSPro used to convert to jpeg. Difficult to be sure all bugs removed so comments welcome. (exe tested on WinXP) Win98, Zip 182 KB including some test pictures.

ASP_Volume3 #49463
BmpToJpeg GDI+ version (Quality & Regions)

BmpToJpeg GDI+ version (Quality & Regions) by Robert Rayment. Converts bmp to jpeg. See effect of quality before saving. Selected regions can be of a different quality. Regions can be rectangle, rounded rectangle, oval or lasso. It appears that there are intermittent problems with ijl15.dll and Win2K. So this prog has used cut, paste & adapted code from Carles P V (CodeId=42376) & MrBoBo (CodeId=42488) for GDI+ which, if you haven't got it, can be downloaded at - www.microsoft.com/downloads/release.asp?releaseid=32738 - Install gdiplus.dll in your system or app folder. (Exe tested on XP Home) Win 2K, Win 98, Zip 241 KB (Couple of bmps included).

ASP_Volume3 #49464
CUBOID CITY

CUBOID CITY by Robert Rayment. Demo of what can be done with wire-frame cuboids, using pure VB & a couple of APIs for creating & animating scenes. Several thousand cuboids can be happily handled but make sure to compile the animation program!. Two progs, one to draw cuboid pictures (including random mazes) and the other to use the output files (*.ccc) and animate them. There are lots of options to help with drawing - too many to describe here. The animation program uses planar perspective for speed with mostly pure VB. Speed & direction set by distance of cursor from center of display, eye (camera) level and block heights changeable, collison detection and reaching the pyramid in the mazes explodes all. These progs provide a start for a full 3D wire-frame drawing program. Example ccc files included. See Notes. (Exe tested on WinXP) Win98. Zip 115 KB.

ASP_Volume3 #49465
Brush Vectors(Fin))

Brush Vectors by Robert Rayment. (Added binary input/output. Fast version, see Help for info on Fast redraw.) This is a vector drawing program using brushes with up to 8 widths, 4 directions, color & transparency. A brush stroke is started with a left-click(or space bar), move mouse to draw & left-click(or space bar) to end it. Each stroke is stored in a vector array which can be saved to a file. Colors can be parked and also saved to a file. The advantage of vectors is that they are full 24-bit color can be stretched/shrunk to a new canavs size. File format can be ASCII (.vec) or binary (.veb). Vec files are usually much smaller than BMP and veb files often smaller than GIF or JPEG. There aren't many aids to drawing yet apart from a fill tool and Shift & Ctrl keying to force vertical & horizontal drawing. So it needs some skill to produce nice pictures. Undo/Redo is almost unlimited, vectors can be deleted from the last drawn or clipped down to the last undo. Deleting any individual vector is not included yet. Important to read the help file to get the most out of this prog. (exe tested on WinXP), Win98, Zip 48KB.

ASP_Volume3 #49466
Knob-Thumb-wheels & Skins

Knob-Thumb-wheels & Skins Demo by Robert Rayment. An earlier version has been deleted. Three programs. The first develops and tests bmp strips from a starting image where, for knob wheels the central rotating part's radius and incremental angle can be set as well as, for thumb wheels, number of repeated images. The second program makes compressed True Color 2D arrays of images and masks using zlib.dll (version 1.1.4.0 from www.winimage.com/zlibdll/). For most efficient inflating zlib needs the original uncompressed size. For pictures the original width and height are needed and this is stored at the beginning of the compressed picture array, from which the uncompressed size can also be calculated. The third program uses zlib.dll to inflate the images from a resource file. This is a headerless form, skin, controls & fonts resizing demo using some standard methods (plus some WAV sounds also in the resource file) - a test bed for trying out things. There are 2 full skins but the demo also stores some bitmaps in image boxes, which then serve as buttons and source for tiled skinning. When compiled all the images are then contained within the exe. See Notes.txt. (exe tested on WinXP Home) Win98 Zip 76 KB.

Languages
Top Categories
Global Discovery