Tutorial:FILT

From The Powder Toy
Revision as of 23:20, 22 December 2013 by minecraft-physics (talk | contribs) (Filter for Photons)
Jump to: navigation, search

FILT is one of those seemingly boring, but in reality extremely complex and interesting elements. The wiki description of FILT is way out of date, and completely ignores many aspects of its behaviour, particularly when used as a component in electronics or as a thermal conductor. So, here are some uses of FILT:

Heat Conductor

Probably the simplest way to use FILT, for a beginner at least, is to transfer heat. FILT has a very high thermal conductivity and is indestructible to everything but BOMB and DEST, making it ideal for transferring heat away from reactors to cooling fluids. It is also useful for debugging, as it changes colour from blue at 0ºC to red at 1000ºC. (more detail on this in later sections). Note that if ambient heat is enabled, FILT's temperature will not be affected by the 'air temperature' around it, only items touching it.

ARAY Conduit

The basis of most modern electronics in TPT is FILT/ARAY conduits. If you SPRK a pixel of ARAY from a basic conductor (a conductor that is not PSCN, INST or INWR), it will create a beam of BRAY with a life of 30 that will SPRK any basic conductors or PSCN in the way. This is useful for transferring current over long distances quickly and more compressed-ly than INST, however it is clunky and slow as one must wait 30 frames before the ARAY can be SPRK'd again compared to 4 for INST.

If a pixel of FILT is pressed up against ARAY, and another pixel of conductor is on the end, it will conduct instantly. This is currently the most reliable, fastest method of conducting electricity.

Note that both white and brown BRAY can pass through it, and can enter, exit and re-enter the FILT without stopping the beam. White BRAY will pick up the display colour of the FILT, but cannot be used for wavelength transfer.

Filter for Photons

Here is where it gets really complicated. As I said before, FILT's colour changes with it's temperature. Anyone can see that by heating up filt, you impart increasing (closer to red) wavelengths of the EM spectrum to photons. But in fact, the way that FILT affects photons is decided by a combination of its temp/ctype and tmp.

The temp of a pixel of FILT affects the wavelength it imparts in increments of about 40ºC, but this is actually not the best way to set temperature. The wavelength is actually a combination of binary digits 30 long, stored in PHOT's ctype, giving a total of 2^31-1 = 2147483647 unique wavelengths. To make any sense of this, we need to look at how binary works:

NOTE: if FILT's ctype is 0 (default), temp sets its wavelength characteristics and no spectrum appears in the GUI when you mouseover FILT. If the ctype is any number between 1 and 2147483647 inclusive, temp WILL NOT affect its characteristics, and the FILT's spectrum is shown in the GUI.

NOTE 2: putting a pixel of DTEC next to a group of FILT will set the spectrum of any connected FILT to that of any passing PHOTons.

A binary string is made up of 1's and 0's. Each one converts to ...2^3,2^2,2^1,2^0 (...8,4,2,1). So, 1001 in decimal is 9 (2^3+2^0) and 101010 is 42 (2^5+2^3+2^1) However, in a PHOT wavelength, each one means "wavelength present" and each 0 means "wavelength not present", and PHOT uses a string 30 bits long. So, a ctype of 1 (binary 000000000000000000000000000001) means "1 wavelength at the shortest wavelength"and a ctype of 2^29=536870912 (binary 010000000000000000000000000000) means "1 wavelength at the longest wavelength." To force white light, one would set the ctype to 2147483647 (binary 11111111111111111111111111111111). This means that setting FILT's ctype any power of two will give a single-wavelength photon.

Now that FILT's colour is set, one can go through the tmp modes: (NOTE: the wiki page is somewhat out of date)

tmp=0- "set colour" mode. FILT sets the spectrum of any PHOT passing through it to that of itself.

tmp=1- "AND" mode. Absorbs any photons with wavelengths that the FILT is not set to. Can act as an and gate when used with DTEC. [[1]]

tmp=2- "OR" mode. Adds the wavelength(s) it is set to to PHOT.

tmp=3- "subtract" mode. FILT removes the wavelength(s) it is set to from any PHOT passing through it.

tmp=4- "red shift" mode. Shifts every wavelength towards the red end of the spectrum. Only works with simple spectra (set by temp), with hotter FILT impacting the PHOT more.

tmp=5- "blue shift" mode. Shifts every wavelength towards the blue end of the spectrum. Only works with simple spectra (set by temp), with hotter FILT impacting the PHOT more.

tmp=6- "no effect". Does nothing to incoming photons. Useful for if you're trying to intersect PHOT and ARAY beams.

tmp=7- "XOR" mode. Allows PHOT with similar colours through, but removes wavelengths FILT is set to from differently-coloured PHOTons.

tmp=8- "NOT" mode. Inverts the spectrum of incoming PHOT, regardless of FILT's spectrum. That is to say, it adds in every wavelength the PHOT does NOT have, and removes all that it does have.

tmp=9- "old QRTZ scattering" mode. This gives the photons that pass through a random -/+ X/Y velocity and changes their color randomly (usually to a hue of purple or yellow).

Setting the tmp of FILT to anything but 0-9 will make it do nothing.


Hope this guide has been helpful! --minecraft-physics 10:06, 22 December 2013 (UTC)