Advertisement

Results for "Author: robert rayment"

C_Volume2 #77275
Linear transforms

Linear Transforms by Robert Rayment. This is maybe 'old hat' to some of you. It shows in pure VB, apart from loading bitmaps & set & get pixels, how to map a rectangular bitmap area onto a non-reeentrant quadrilateral, a circle, cylinder, right-circular cone and a sphere. I've stopped short of automating the shapes and saving the transfoms so you need to change the parameters in the code to get variations. Hopefully the comments are sufficient for you to do with it as you wish! Zip file 145KB (With some bitmaps).

C_Volume2 #77281
Spirals

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.

C_Volume2 #77671
Knots

Knots by Robert Rayment. Load knots, Save knots (*.knt files), Make a knot (colored cursor, + hairs, grid). Examples KNOTS.knt (20 knots drawn using this prog) & Hello.knt included. See also KnotsInfo.txt. Zip 21KB, Win98.

C_Volume2 #78191
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.

C_Volume2 #78588
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).

C_Volume2 #78861
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.

C_Volume2 #79280
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.

C_Volume2 #79299
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.

C_Volume2 #80015
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).

C_Volume2 #80202
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.

Java_Volume1 #85421
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.

Java_Volume1 #85521
Desktop Magnifier & Color Picker

Desktop Magnifier & Color Picker by Robert Rayment. Always on top, x2, x4 & x8 magnification, RGB to Clipboard, exact location of cursor shown on magnifier with a black dot. Magnifier can be moved to any part of the screen and the code can easily be changed to alter the area of magnification if wanted. Smooth operation. Win98 (exe WinXP) Zip 7 KB.

Java_Volume1 #86155
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.

Java_Volume1 #86164
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.

Java_Volume1 #86251
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.

Java_Volume1 #86450
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.

Java_Volume1 #86463
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.

Java_Volume1 #86680
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).

Java_Volume1 #86868
Semaphore & the International Flag Code

Semaphore & the International Flag Code by Robert Rayment. Enter any text and illustrate message using Semaphore or Ship flag codes. Learning aid. Straightforward code, easily embellished. (Zip 144 KB).

Java_Volume1 #86936
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.

Languages
Top Categories
Global Discovery