Difference between revisions of "Element:FILT"

From The Powder Toy
Jump to: navigation, search
(Filter for Photons)
(Added the fact that FILT changes the deco color of the particles CRAY spawns and of BIZR.)
Line 90: Line 90:
  
 
DTEC can be used to modify FILT's ctype: when PHOT or BRAY hits DTEC, DTEC copies the spectrum into a line of directly adjacent FILT blocks, if any are present.
 
DTEC can be used to modify FILT's ctype: when PHOT or BRAY hits DTEC, DTEC copies the spectrum into a line of directly adjacent FILT blocks, if any are present.
 +
 +
=== Decoration Color Changing ===
 +
 +
When particles spawned from a CRAY pass through FILT, the deco color of the particles change to match the ctype of the FILT. BIZR also changes its deco color to the ctype of FILT when it passes through it.
  
 
== Examples ==
 
== Examples ==

Revision as of 22:11, 10 August 2015

FILT.png Filter
Properties
Section Solids
Spawn temperature 22°C
Heat Conductivity 100%
Relative weight 100
Gravity 0
Acid dissolve rate 0.1%
Flammability 0
State Solid
Misc properties
Source code


Creation

Only with brush, cannot be created with reactions.

Usage

When created, Filter's color is based on its temperature. It will scale from dark blue to dark red, corresponding roughly to temperatures between 200 and 840°C. Filter has high temperature conductivity, and its coulour-changing makes it easy to see the flow of heat.

Filter will color BIZR and BRAY (not PSCN type) passing through it. FILT will also change the color of passing photons and BRAY using binary logic, described in detail later. FILT is one of those seemingly boring, but in reality extremely complex and interesting elements. 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 conductors in the way except for INWR. This is useful for transferring current over long distances with greater compression than INST matrices, however it is clunky and slow as one must wait 30 frames before the ARAY can be SPRK'd again compared to 8 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 with no wait time, since no BRAY is created. 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, and as of version 90.1 can be used for wavelength transfer and operations similar to PHOT.

Filter for Photons

Waves.gif

BIZR/G/S and PHOT particles store their wavelengths in the ctype field. Wavelengths are stored in binary, using 30 out of 32 available bits. A set bit indicates that a specific wavelength is present, a zero bit means it is absent.

The visible color depends only on amount of bits in 5 bit groups: red, yellow, green, cyan, and blue. They are 9, 3, 6, 3, and 9 bits long respectively. The position of bits within a group is preserved, but does not affect particle's color. More specifically color only depends on proportions of those amounts. To get white color, set the ctype to 0x3FFFFFFF or -1, which will enable all the wavelengths. A photon dies if its ctype is 0, which means that no wavelengths are present.

FILT uses the ctype field to store wavelengths too, however if ctype is 0, wavelengths are calculated from its temperature: it slowly changes from blue when cold, to red when hot. More specifically, a group of 5 bits is set, and starting from 0°C, every 40°C the group is red-shifted by 1, and after 25 shifts, at 1000°C, the group is shifted to the most red wavelengths.

FILT has many operation modes determined by its tmp property:

FiltTmp.gif
  1. "set" mode: FILT's spectrum is copied into PHOT particles that pass through it
  2. "and" mode: A bitwise and is performed on PHOT's and FILT's spectrums and the result is stored in the PHOT particle, any wavelengths not present in FILT will be removed from PHOT.
  3. "or" mode: Performs a bitwise or: all wavelengths present in FILT are "enabled" in PHOT, if not already.
  4. "sub" mode: Performs a bitwise and-not: all wavelengths present in FILT are subtracted from PHOT.
  5. "red shift" mode: The wavelengths of a photon are red-shifted. The distance of the shift is calculated from the temperature only: the ctype value of the FILT is ignored..
  6. "blue shift" mode: Like "red shift", but the shifting direction is opposite, wavelengths are moved towards the blue end.
  7. "nothing" mode: No spectrum changes are performed. Useful if you want to cross beams of PHOT and ARAY without mangling the spectrum
  8. "xor" mode: Performs a bitwise xor: all wavelengths present in FILT are "flipped" in PHOT's spectrum, that is, if some color was on, it turns off, and vice versa.
  9. "not" mode: Performs a bitwise not: all wavelengths of PHOT are flipped. Note that FILT's spectrum is ignored.
  10. "QRTZ scattering" mode: Randomizes photons' velocity and randomly changes their color, just like QRTZ in old versions of The Powder Toy.

Any other tmp value makes FILT do nothing, like the "nothing" mode. It is strongly recommended not to use any tmps above those listed here, as the developers may add more modes for those tmp values in the future, which would break your save.

DTEC can be used to modify FILT's ctype: when PHOT or BRAY hits DTEC, DTEC copies the spectrum into a line of directly adjacent FILT blocks, if any are present.

Decoration Color Changing

When particles spawned from a CRAY pass through FILT, the deco color of the particles change to match the ctype of the FILT. BIZR also changes its deco color to the ctype of FILT when it passes through it.

Examples

A thermometer done with using FILT.
A spectrum analyzer, which can detect the color of incoming photons.