text:
Houses For Rent University City, Mo, Three Colors: Blue English Subtitles, Appomattox Oil Rig Size, Similasan Stye Eye Drops, Gerita Fanfiction Curl, Hyatt Regency Grand Cypress All Inclusive, Mount Zion Baptist Church Arlington Video, Conrad Fort Lauderdale, Cannon Bar Mount Chart, The Backup Plan 2 Full Movie, Shock Meaning In Gujarati, Gorintaku Cinema Director, Dorian Yates' Blood And Guts Back, Dremel Stylo+ Uk, George Taliaferro Wife,  1 total views,  1 views today" /> Houses For Rent University City, Mo, Three Colors: Blue English Subtitles, Appomattox Oil Rig Size, Similasan Stye Eye Drops, Gerita Fanfiction Curl, Hyatt Regency Grand Cypress All Inclusive, Mount Zion Baptist Church Arlington Video, Conrad Fort Lauderdale, Cannon Bar Mount Chart, The Backup Plan 2 Full Movie, Shock Meaning In Gujarati, Gorintaku Cinema Director, Dorian Yates' Blood And Guts Back, Dremel Stylo+ Uk, George Taliaferro Wife,  2 total views,  2 views today" /> how to make all angles with compass

# how to make all angles with compass

The answer is: 1 point equals 11.25 ° And its done in the following steps: 8). first two years of college and save thousands off your degree. Your teachers use large machines called copy machines to make multiple copies of worksheets or other papers to pass out to the class. How to construct a 45 Degree Angle using just a compass and a straightedge. Step IV: With Q as centre and the same radius, draw an arc, cutting the arc drawn in step II at R. Step V: Join OR and produce it to any point C. ∠AOC so obtained is the angle of measure 120º. Step III: With centre P and radius more than $$\frac { 1 }{ 2 }$$(PQ), draw an arc in the interior of ∠AOB. Now we measure the width of the arc from original angle and cut the arc to the same width. We'll use a compass and an ordinary straight edge. This mode behaves exactly the same as the previous. Make sure to keep the compass open to the same angle. Quiz & Worksheet - Who is Judge Danforth in The Crucible? Create your account, Already registered? (v) Construction of An Angle of 120º Steps of Construction: Step I: Draw a ray OA. just create an account. A Euclidean construction. We can construct a 90º angle either by bisecting a straight angle or using the following steps. This is impossible in the general case. Then we draw a ray and construct an arc of same radius. Hope it helps! The two utensils should be … Given an angle formed by two lines with a common vertex, this page shows how to construct another angle from it that has the same angle measure using a compass and straightedge or ruler. Lay down a strip of duct tape, face-side up. Angle trisection is the construction, using only a straightedge and a compass, of an angle that is one-third of a given arbitrary angle. Constructing Perpendicular Bisectors in Geometry, Quiz & Worksheet - Copying Angles with a Compass, Over 83,000 lessons in all major subjects, {{courseNav.course.mDynamicIntFields.lessonCount}}, Constructing Triangles: Types of Geometric Construction, Geometric Constructions Using Lines and Angles, Saxon Algebra 1/2 Homeschool: Online Textbook Help, Biological and Biomedical Sciences, Culinary Arts and Personal Step VI: With R as centre and the same radius, draw an arc, cutting the arc drawn in step V at B. This Euclidean construction works by creating two congruent triangles. In this section, we will learn how to construct angles of 60º, 30º, 90º, 45º and 120º with the help of ruler and compasses only. (iii) Construction of An Angle of 90º Steps of Construction: Step I: Draw a ray OA. In this lesson, we will use a compass and a straight edge to draw a copy of an angle. (iv) Construction of An Angle of 45º Steps of Construction: Step I: Draw ∠AOB = 90º by following the steps given above. See the proof below for more on this. A Euclidean construction Log in here for access. The angle ∠AOC so obtained is the required angle of measure 45º. Lets draw a ray with endpoint $A$, which will be the first vertex of the triangle. Study.com has thousands of articles about every Steps: Construct a perpendicular line; Place compass on intersection point These numbers allow the compass to show magnetic North azimuths or true North azimuths or bearings, which are commonly stated in this notation. In this mode press = button to make all the angles equal. study Then, lay another face-up piece along the … It … construction of angles using ruler and compass In this section, you will learn how to construct angles using ruler and compass. Construction of an Angle of 60º In order to construct an angle of 60º with the help of ruler and compasses only, we follow the following steps : Steps of Construction Step I: Draw a ray OA. Angles are formed Step 7 Look at your paper. See the proof below for more details. Step 2: Place the point of the compass at P and draw an arc that cuts the arm at Q. To learn more, visit our Earning Credit Page. Making sure we don't change the opening of our compass, we put the compass' pointed end on the A of our copy and draw another arc. Now we draw a straight line and put a point on the line, which we'll call point A. Let's see how to do this! Learn how to transport angles using a compass and a straighedge. The (very) Basics - Equipment. Now lets put the two angles together to see how we did! Above formed angle AOB = 90 Degree Now, to construct at 45 degree angle, we will construct the angle bisector of above angle AOB. Draw a straight line from the angle's vertex to point C. We take the ruler and set the compass width to the length of a given side $a$. It doesn’t have to be accurate, but it will give us an idea from where to start. Open your compass to any radius r, and construct arc (A, r) intersecting the two sides of angle A at points S and T. Construct arc (B, r) intersecting line l at some point V. Construct arc (S, ST). Conflict Between Antigone & Creon in Sophocles' Antigone, Quiz & Worksheet - Desiree's Baby Time & Place, Quiz & Worksheet - Metaphors in The Outsiders, Quiz & Worksheet - The Handkerchief in Othello. person_outline Timur schedule 2017-06-28 19:59:40 This calculator allows you to enter direction angle, either in DMS (degrees, minutes, and seconds) or decimal degrees and outputs closest to the compass point for different compass … To construct an angle, we must need the following mathematical instruments. This construction works by creating an equilateral triangle. Place the compass point at B, and using the same radius, strike another arc within the rays. Step IV: With Q as centre and the same radius as in steps II and III, draw an arc, cutting the arc drawn in step II at R. Step V: With Q as centre and the same radius, draw an arc. (ii) Construction of An Angle of 30º Steps of Construction: Step I: Draw ∠AOB = 60º by using the steps mentioned above. Step IV: With centre Q and the same radius, as in step III, draw another arc intersecting the arc in step III at R. Step V: Join OR and product it to any point C. Step VI: The angle ∠AOC is the angle of measure 30º. The angle ∠AOB so obtained is the angle of measure 60º. Construction Of Some Standard Angles. He has taught high school chemistry and physics for 14 years. {{courseNav.course.mDynamicIntFields.lessonCount}} lessons And with O as center , draw an arc which cuts line segment OB at P and OA at Q . Even though a compass draws curves, we can use one to draw an angle. {{courseNav.course.topics.length}} chapters | You must be aware of that.. Flashcards - Real Estate Marketing Basics, Flashcards - Promotional Marketing in Real Estate, How to Differentiate Instruction | Strategies and Examples, Instructional Strategies for Learner-Centered Teaching, Holt Physical Science: Online Textbook Help, Saxon Algebra 1 Homeschool: Online Textbook Help, FTCE Humanities K-12 (022): Test Practice & Study Guide, Hellenism and Athenian Philosophy: AP World History Lesson Plans, Earth's Material Resources: Homework Help, Quiz & Worksheet - Symmetric Property in Geometry, Quiz & Worksheet - Types of Psychology Research Designs, Quiz & Worksheet - Characteristics of Brief Psychotic Disorder, Quiz & Worksheet - Characteristics of Carolingian Architecture, Group Behavior in Social Psychology: Definition & Influences, Feminist Therapy: Definition & Techniques, PTE Academic Registration Information & What to Bring, 5th Grade Science Standards in California, Response to Intervention (RTI) in Illinois, South Dakota State Standards for Social Studies, Tech and Engineering - Questions & Answers, Health and Medicine - Questions & Answers, Working Scholars® Bringing Tuition-Free College to the Community, Open the compass to any angle, put the pointed leg at point, Keep the compass open to the same angle, put the pointed end at the copied point, Adjust the compass so the pointed leg is on point, Put the pointed end of the compass on point, On the copy, draw a straight line from point. This page shows how to construct (draw) a 60 degree angle with compass and straightedge or ruler. So, each angle is of measure 36 degree Create an account to start this course today. One arm has a pointed end and the other holds a pencil. Draw a line from the original point on the base line to the intersection (s) of the arcs. courses that prepare you to earn Visit the Saxon Algebra 1/2 Homeschool: Online Textbook Help page to learn more. Step 3: Place the point of the compass at Q and draw an arc of radius PQ that cuts the arc drawn in Step 2 at R. Step 4: With the point of the compass at R, draw an arc of radius PQ to cut the arc drawn in Step 2 at S. Step 5: With the point of the compass still at R, draw another arc of radius PQ near T as shown. We use one of those angles to get the desired 60 degree result. ⇒ ∠POR = 60º ⇒ ∠AOB = 60º [∵ ∠POR = ∠AOB]. Label as C the point of intersection of the two arcs. Put the pointed end on the intersection of the straight line and the first curve we drew for our copied angle, which is point C. Use the compass to make an arc that will intersect the previous arc. This can be good way to start a problem followed by small adjustments to the lines by dragging. Next, we adjust the compass so that it is as wide as points B and C on our original angle drawing. Get access risk-free for 30 days, Anyone can earn Ste… This new line is perpendicular to the base line and makes two 90-degree angles with it. If magnetic declination between the magnetic North and true North at latitude angle and longitude angle is known, then direction of magnetic North also gives direction of true North. Let's draw a random angle that we will make a copy of. In this section, we will learn how to construct angles of 60º, 30º, 90º, 45º and 120º with the help of ruler and compasses only. Did you know… We have over 220 college flashcard set{{course.flashcardSetCoun > 1 ? For example, the angle 2π/5 radians (72° = 360°/5) can be trisected, but the angle of π/3 radians (60°) cannot be trisected. Lets start with constructing the first regular polygon, the equilateral triangle. 's' : ''}}. You can test out of the Nice and sharp, not … Recollect the property of a $30^o-60^o-90^o$ triangle. Make sure that the arc intersects with the previousl… Most people have only used this tool to draw circles, but it can also be used for measuring angles. Draw a working line, l, with point B on it. The last step is to draw a straight line from point A through the intersection of our two arcs, which is point B. 3 cm. Let's start our copy by labeling the vertex of the original angle, A. Supplementary angles are angles that add up to 180°. Often you are required to construct some angles without using a protractor. With a scale & compass, you may draw certain basic angles, like 60°, 90°, 45°…..etc etc & their even fractions easily. Recall that an equilateral triangle has all three interior angles 60 degrees. All other trademarks and copyrights are the property of their respective owners. Place the compass point at A, and strike an arc within the angle's rays. Construction Of An Angle Using Compass And Ruler To draw an angle equal to a given angle. Sociology 110: Cultural Studies & Diversity in the U.S. CPA Subtest IV - Regulation (REG): Study Guide & Practice, Properties & Trends in The Periodic Table, Solutions, Solubility & Colligative Properties, Creating Routines & Schedules for Your Child's Pandemic Learning Experience, How to Make the Hybrid Learning Model Effective for Your Child, Distance Learning Considerations for English Language Learner (ELL) Students, Roles & Responsibilities of Teachers in Distance Learning, Between Scylla & Charybdis in The Odyssey, Hermia & Helena in A Midsummer Night's Dream: Relationship & Comparison. credit by exam that is accepted by over 1,500 colleges and universities. The compass arc is made to intersect the arc. Services. We look at how much the angle has “opened” as compared to the full circle. credit-by-exam regardless of age or education level. How to bisect an angle with compass and straightedge or ruler. It works by creating two congruent triangles. Step II: With centre O and any radius draw an arc PQ with the help of compasses, cutting the ray OA at P. Step III: With centre P and the same radius draw an arc cutting the arc PQ at R. Step IV: Join OR and produce it to obtain ray OB. Converting compass point to degrees value in the angle units scale.TOGGLE : from degrees into compass points in the other way around.CONVERT : between other angle measuring units - complete list.How many degrees are in 1 compass point? Use the compass to strike two arcs of equal radius, one centered on each of the two new points. | {{course.flashcardSetCount}} Adjust the compass so one leg is on point B and the other leg is on point C. Make sure to keep the compass open to the same angle. Line up the tip of each writing utensil with one end of the drawn radius. and career path that can help you find the school that's right for you. Select a subject to preview related courses: Who needs a copy machine when we have a compass and a straight edge! Then, put the compass’ needle in the point $A$ and make an arc. The angles at a point add up to 360°. Again use compass and open it to any convenient radius. A proof is shown below. But the problem arises, when you need to draw … say, 23°.. for that you may check any T- ratio wrt 23° from the table. © copyright 2003-2021 Study.com. Animation of how to construct a 30 Degree Angle using just a compass and a straightedge (ruler). Then in the same ratio, draw 2 sides of a right triangle. Construction of an Angle of 60º To draw the copy we take the following steps: To unlock this lesson you must be a Study.com Member. Enrolling in a course lets you earn progress by passing quizzes and exams. A Euclidean construction. This article teaches you how to draw a 90 degrees angle using a compass and a ruler. Software 1 ... "quaternion_compass.ino" Instructions: The attached file "QC_files.rar" contains all of … A compass is a tool used to draw arcs and circles. What is the Main Frame Story of The Canterbury Tales? In ΔOPR, we have OP = OR = PR ⇒ ΔOPR is an equilateral triangle. Create Mat. Put the point of the compass on the A of our original angle and draw an arc through both line segments. We can make identical copies of angles, but we won't use a copy machine. To bisect an angle means that we divide the angle into two equal (congruent) parts without actually measuring the angle. imaginable degree, area of Step II: With O as centre and any convenient radius, draw an arc, cutting OA at P. Step III: With P as centre and the same radius, an arc cutting the arc drawn in step II at Q. Matthew has a Master of Arts degree in Physics Education. Now, in a regular pentagon measure of all the angles are same because all its sides are equal. You could measure each of the point. Step VII: Draw OB and produce it to C. ∠AOC is the angle of measure 90º. To make a copy of an angle we use a compass and a straight edge. Log in or sign up to add this lesson to a Custom Course. Different compass roses (4, 8, 16, 32, 128-wind compass roses) are supported. how to draw angles with a compass Home; Events; Register Now; About Example.Construct a triangle if we know the length of the side $a$. To make a copy of something we need something to make a copy of! Step 1: Draw the arm PA. Step II: With O as centre and any convenient radius, draw an arc cutting OA at P. Step III: With P as centre and the same radius draw an arc, cutting the first arc at Q. Not sure what college you want to attend yet? Both triangles above For example, you may draw the first angle with the red color, then you may draw the second angle with the green color. Get the unbiased info you need to find the right school. When Students Should Draw the Line on Professorial Misconduct, How to Become a Graphic Illustrator: Career Roadmap, Overview of Adult Education Programs in Illustration & Drawing, Comic Cartoonist: Employment Info & Career Requirements, How to Become a Data Architect: Education and Career Roadmap, List of Free Online Computer Forensics Courses and Classes, Evolutionary Anthropology Masters Programs, Online Courses and Training for a Fiber Optics Related Career, Distance Learning Airport Ground Safety Courses, Saxon Algebra 1/2: Whole Numbers & Operations With Whole Numbers, Saxon Algebra 1/2: Graphs on the Coordinate Plane, Saxon Algebra 1/2: Properties of Real Numbers, Saxon Algebra 1/2: English & Metric Measurement, Saxon Algebra 1/2: Conversion by Unit Multipliers, Saxon Algebra 1/2: Simplifying Expressions, Saxon Algebra 1/2: Simplifying and Solving Equations, Saxon Algebra 1/2: Other Types of Equations, Saxon Algebra 1/2: Functions & Trigonometry, Saxon Algebra 1/2: Lines, Points, Segments, and Planes, Saxon Algebra 1/2: Perimeter and Circumference, Saxon Algebra 1/2: Surface Area and Volume, How to Construct Angles Using a Compass & Straight Edge, AP Calculus AB & BC: Homework Help Resource, High School Algebra II: Tutoring Solution, NY Regents Exam - Geometry: Test Prep & Practice, CAHSEE Math Exam: Test Prep & Study Guide, TExES Mathematics 7-12 (235): Practice & Study Guide, Calculating the Square Root of 27: How-To & Steps, SAT Math Level 2: Structure, Patterns & Scoring, Using a Calculator for the SAT Math Level 2 Exam, Recognizing & Modeling Periodic Functions, Quiz & Worksheet - Pascal's Contributions to Math & Science, Quiz & Worksheet - Changing Mixed Numbers to Improper Fractions, Quiz & Worksheet - Basic Probability Rules & Theories, Quiz & Worksheet - Bayes Theorem Practice Problems, Foundations and Linear Equations: Help and Review, Matrices and Absolute Value: Help and Review, Using FOIL, Graphing Parabolas & Solving Quadratics to Factor: Help & Review, California Sexual Harassment Refresher Course: Supervisors, California Sexual Harassment Refresher Course: Employees. Justification: In above figure, join PR. This YouTube channel is dedicated to teaching people how to improve their technical drawing skills. A protractor is also a type of compass–but it has only 180-degrees whereas a compass a 360-degrees rotation. Constructing congruent angles, we must need the following steps is as wide as points B and C on original! And with O as center, draw an arc through both line segments more visit! Will use a compass and straightedge or ruler measure of all the angles equal did! Other holds a pencil angle ∠AOC so obtained is the angle into two (! Lay down a strip of duct tape, face-side up: 8 ) together to see how we!... 90-Degree angles with it angles to get the desired 60 degree result North azimuths or true North azimuths true... On our original angle drawing and Q respectively pentagon measure of all the angles at a point on paper. Attend yet ray with endpoint $a$ and make an arc construct a 45 degree angle with compass a... It to C. ∠AOC is the required angle of measure 60º 32, 128-wind compass roses ) supported! Youtube channel is dedicated to teaching people how to construct an angle of measure 45º steps: ). And put a point on the line, l, with point B it! Through the intersection of our two arcs draw a ray with endpoint $a$ a from! Three interior angles 60 degrees the angles at a point on the paper enrolling in regular! Point add how to make all angles with compass to 180° copy machine when we have a compass is a used! Steps: to unlock this lesson you must be a Study.com Member want attend... C the point of intersection of the drawn radius measure the width the! And set the compass to show magnetic North azimuths or bearings, which we 'll use compass. Need something to make multiple copies of angles, we will use a compass and open it to any radius. Though a compass and open it to any convenient radius draw an arc through both line segments,... [ /math ] triangle so that it is as wide as points and... Machines called copy machines is they make identical copies of worksheets or other papers to out... ” as compared to the lines by dragging a straighedge taught high school chemistry and Physics 14! Original angle drawing about copy machines to make all the angles equal the arc original... Compass on the a of our original angle and cut the arc to the intersection of the ’... Let 's draw a working line, which has interior angles of 45, 45 and 90 angle. And its done in the point $a$ and make an of! Two equal ( congruent ) parts without actually measuring the angle ∠AOB so obtained is the angle ∠AOB so is! Something we need recollect the property of their respective owners steps of:. Teaching people how to bisect an angle of 90º steps of Construction: step:. [ math ] 30^o-60^o-90^o [ /math ] triangle line to the base line and put a add. - Who is Judge how to make all angles with compass in the following steps: 8 ) it... 60º ⇒ ∠AOB = 60º [ ∵ ∠POR = ∠AOB ] you want to attend?. Make a copy of also a type of compass–but it has only whereas... To get the unbiased info you need to find the right school what 's awesome copy! A strip of duct tape, face-side up line up the tip of each writing utensil one... 60 degree result these simple projects, you will need: a pencil that. Cutting OA and OB at P and draw an arc the arm at Q s of. Piece along the … Matthew has a Master of Arts degree in Physics Education more... Adjust the compass on the base line and put a point add up to this. Compass so that it is as wide as points B and C on our angle! And a ruler ∠AOB so obtained is the angle, lay another piece. Same radius the intersection of our two arcs, which has interior angles 60 degrees opened as!, face-side up used this tool to draw circles, but it can also be used for angles. For these simple projects, you will need: a pencil compass on the line which! Shows how to construct a 90º angle either by bisecting a straight edge triangle, which interior... Page to learn more, visit our Earning Credit page which cuts line OB! Teaching people how to bisect an angle using compass and open it to angle... To intersect the arc from original angle and draw an arc which cuts segment... Draw circles, but it will give us an idea from where to start:... ( v ) Construction of an angle, draw 2 sides of a given $! Use a compass and a straightedge with centre O and any convenient radius only used this tool draw.: place the point$ a $and make an arc should be … angles are formed 7! More, visit our Earning Credit page now we get our compass and a ruler ( v Construction! Angle drawing right triangle roses ( 4, 8, 16 how to make all angles with compass 32, 128-wind compass )! Whereas a compass is a measuring tool with a hinged set of arms and ruler to draw an using... Centre O and any convenient radius draw an arc that cuts the arm at Q given side$ \$! Now lets put the compass open to the class to start a problem followed by adjustments... Make multiple copies of worksheets or other papers to pass out to the same angle,! Drawn radius triangle if we know the length of a [ math ] [! He has taught high school chemistry and Physics for 14 years draw ) a 45 angles! Ste… lets start with constructing the first regular polygon, the bisector of ∠AOB angles with it make! Often you are required to construct a 90º angle either by bisecting a edge! We draw an arc through both line segments commonly stated in this notation a Course lets you progress. Improve how to make all angles with compass technical drawing skills = ∠AOB ], the bisector of ∠AOB has high!, in a Course lets you earn progress by passing quizzes and exams attend yet on.... Right school of duct tape, face-side up ) a 45 degree angle using compass and a.. Button to make a copy of something we need the compass ’ in! Protractor is also a type of compass–but how to make all angles with compass has only 180-degrees whereas compass!

3 total views,  3 views today


text:
20150930

This started a while back as a hobby project attempting to produce a better and more realistic non-real-time CRT simulation for print media such as the The Bitmap Brothers: Universe book. It ended with some interesting thoughts about tone-mapping and things which can be applied to real-time CRT simulation as well...

Tonemapping
CRT simulation for low-dynamic-range media is mostly a tonemapping and filtering problem. A CRT has a large amount of black surrounding some very bright phosphors, and even more black for vintage arcade monitors which scan only half the fields but at twice the rate. The challenge: how to maintain overall image brightness and still relay the feel of scan lines and tiny phosphors. It is a challenging problem, for example,

There are some common methods of tonemapping in games and film, which fail on this problem, and a solution which might provide some insight on improving tonemapping for games and film.

The most common tonemapping method for games is to tonemap RGB channels individually. This is one of core reasons a majority of games have serious color distortion in the darks (often over-saturation) as the ratios of the color channels are not preserved. The Dec 2014 version of ACES, which is commonly referenced and applied for game engines has this problem.

Often the next evolution of this idea is to split tonemapping into separate operations for luma and chroma. Typically the chroma is left alone with exception of the highlight compression area where channel cross-talk is added (effectively a desaturation) so that brights over-expose to whites instead of clamping at pure primary and secondary hues. Effectively RGB is converted to XYZ then to xyY, then Y (luma) is tonemapped, then xy (chroma) is pulled towards the white-point in areas of over-exposure. This however suffers from a similar problem as tonemapping RGB channels individually. While the chroma is preserved for a single pixel (better), the extent to which the pixels brightness changes during tonemapping is a function of luma (bad).

Specifically luma is mostly effected by green, followed by a little red, and very little blue. So two different pixels say one with only 0.25 of green, and one with only 0.25 of blue, get tonemapped very differently. The blue hues fall off very quickly, the greens quite a bit later. For CRT simulation this presents quite a problem, because often a source "pixel" is spread across phosphors of pure primary color. When tonemapping luma, the ratios of RGB are not preserved across the phosphor splats (multiple output pixels) which represent a source pixel. This has a net result of making the darks look green as contrast is increased in the tonemapper.

The solution for CRT simulation tonemapping, is to instead tonemap max(R,G,B), then normalize RGB and scale to the tonemapped value. This preserves RGB ratios across adjacent pixels representing phosphors of the same input pixel.

One aspect of CRT simulation tonemapping which does not apply to film or games, is that it is desirable with CRT simulation to avoid adding cross-talk on over-exposure. This way the simulated phosphors maintain at pure hues.

Slot Sharpness vs Loss of Brightness
I built a CRT simulation shader which can enlarge an image 16x in each dimension. Showing stills below up to 16x enlargement and what a zoomed out view would look like. The CRT simulation shader for each enlarged pixel accumulates the effect from the 7 nearest slots per color channel across two scan lines. There are controls for tonemapping (exposure, contrast, clipping), scan-line thickness, scan-line horizontal sharpness, slots per source pixel, slot fall-off (controls slot sharpness), slot vertical gap, and something which can provide a magnification projection of part of the image per slot (hack).

The Metal Slug image example below shows roughly the limit of what can be done under an attempt to maintain slot sharpness at the expense of brightness. The tonemapping is using roughly 4x increase in brightness to work around the slot mask, with 2x the contrast. This tends to have a negative effect on the brights, squashing them.

Settings used in test app: 16 400 200 100 066 040 100 080 012 100

Seeing the full size image (below) shows exactly why there is no great solution here. The extreme tonemapping tends to expand out the very bright phosphors, while the less light ones maintain a most of the feel of an individual slot. But the trade off is a lack of ability to maintain the contrast or brightness of the source image.

Slot Bleeding
This next selection of shots shows another compromise. This time allowing the slots to bleed into each other increasing brightness. To work around loosing the perception of slots, I increased the vertical gap between slots, to keep the perception at least of honeycomb layout of slot triplets. This requires only a 3x increase in brightness, and drop to only 1.5x contrast in the tone-mapper. I used the "magnification hack" setting to push the slots to be mostly filled or not filled. Also increased the horizontal scan-line blur compared to the prior section.

Settings used in test app: 16 300 150 100 066 050 100 060 020 030

Visible Scan-Lines and the Importance Of Adaptive Highlight Compression
This time I believe the shot might be from some version of R-Type? Switching to visible scan-lines requires an increase in the slot-mask density (or CRT resolution). Slot mask is almost non-visible in the zoomed out shot. This example also allows some highlight clipping in the tone-mapping step, which can grab back some brightness and dynamic range. When a large amount of highlight tonality is reserved for large dynamic range which is never used, the result tends to be a reduction of contrast or squashing of the highlights. This suggests for games it is very important to smoothly dynamically adaptively adjust the highlight part of the tonal curve at run-time.

Settings used in test app: 16 300 150 030 025 060 160 040 030 100

Estimating What Modern Games Would Look Like on Vintage CRTs
Just for fun I tried running some Star Wars Battlefront press screen shots through the filter. Certainly no major game would ever ship with a CRT filter like this, but I actually prefer the dropped resolution and slot mask as a way to hide the perfection of high-resolution GPU real-time renderings. The result is certainly way less sharp, but effective super-sampling would still allow for effective aiming (fractional pixel movement changes pixel gradient). Also in my case, the lack of information enables the mind to fill in the gaps resulting in a more believable scene.

The blog might chop these on the right, so click the image for link to full size.

20150915

Minimal Operand CPU ISA For IPC

Dumping some thoughts on CPU design, one way to design for higher IPC (ILP) with something similar to a dual-stack forth machine...

This started from the thought that it might be possible to apply almost zero-operand ISA design to a CPU designed for IPC. Packing either 3 or 4 operations into a single 32-bit instruction word. This form of instruction compression has all sorts of advantages, both in reduction of bandwidth and as a side effect reducing the wires and ports required to implement. Started thinking about a fictional implementation of a 32-bit integer only computer, something which, in theory thanks to a minimal ISA, could be JIT compiled on a conventional CPU via just a lookup table (would be very fast emulation). However in this post I'm deviating from the idea of emulation and throwing in ideas which would be better for dedicated hardware (like using per slot data stacks instead of just registers).

Each instruction is a fixed 32-bits in size.
Each instruction holds 4 slots {0,1,2,3}.
Each slot has an 8-bit opcode.

11111111111111110000000000000000
FEDCBA9876543210FEDCBA9876543210
MSB                          LSB
........................ssssssss 8-bit opcode for slot 0
................tttttttt........ 8-bit opcode for slot 1
........uuuuuuuu................ 8-bit opcode for slot 2
vvvvvvvv........................ 8-bit opcode for slot 3

Slots share the following 32-bit registers,
return stack pointer : R
instruction  pointer : I

Each slot has its own 32-bit registers: slot {0,1,2,3},
top     registers : {S,T,U,V}
2nd     registers : {K,L,M,N}

The "top" is the top of a very short per-slot data stack (which loops around on overflow, and has no memory backing). The "2nd" registers are just the 2nd item on the data stack. This split data and return stack shares a lot of similarities in structure to Color Forth style hardware. The reads of top and address registers of other slots, would see the value from the prior clock. So think of all the slots executing in parallel.

Dedicated address registers provide some interesting properties. Becomes possible to limit the opcode space and operations applied to them. It also becomes possible to auto prefetch cache lines into L0 (something much closer than L1) when the address registers are set. So using half the opcode space for 32-bit load and stores with a literal range large enough for access to a complete cache line. The # below represents how many opcode slots are taken up. NOTE, addressing is by 32-bit word, not by byte! The load pushes the fetched value on the slot's data stack (so 2nd ends up being the old top). The store pops the value off the slot's data stack (so top ends up being the prior 2nd, etc). Grabbing 32-bit literals can be done with one opcode "#", taking the next instruction as data, and advancing the CP. There is a secondary load path which uses a top register as an address. The . is a place-holder for some opcode binary data I didn't feel like flushing out.

ENCODING  ASM   #   MEANING
--------  ----  --  -------
1.....ss  s@    4   [top(s)+i]=top(%)
1.......  #     1   top(%)=next instruction

% = current slot
s = 2-bit slot index
i = 4-bit unsigned immediate

Integer operations can take advantage of slot implied destination and first source, using another slot's "top" as 2nd source or using the current slot's "2nd". Using "2nd" consumes the value from the slot's local data stack. Using "top" from another slot does not consume the value. These support cross slot source reads without taking much opcode space. I left out shifts and other operations, just providing a few examples below,

ENCODING  ASM   #   MEANING
--------  ----  --  -------
1.....ss  s     4   top(%)=src(s)
1.....ss  s+    4   top(%)=top(%)+src(s)
1.....ss  s*    4   top(%)=top(%)*src(s)
1.....ss  s&    4   top(%)=top(%)&src(s)
1.....ss  s|    4   top(%)=top(%)|src(s)
1.....ss  s^    4   top(%)=top(%)^src(s)
1.......  -     1   top(%)=-top(%)
1.......  ~     1   top(%)=~top(%)

% = current slot
s = 2-bit slot index
src(s) := if(s==%) 2nd(%) else top(s)

Address register operations are separate from standard ALU ops. Supporting ability to write to another slot's address register unlocks working on address registers in any slot. Setting an address register pops the top off the slot's local data stack. Fetching an address register pushes the value on the slot's local data stack.

ENCODING  ASM   #   MEANING
--------  ----  --  -------

% = current slot
s = 2-bit slot index
src(s) := if(s==%) 2nd(%) else top(s)

Branching can act as a terminator of the 4 opcode packed 32-bit instruction word. So slots after a branch become a nop, and the space is reused for a literal for the branch itself. So 24-bit, 16-bit, or 8-bit, or 0-bit displacement.

Bacon Wrapped Sour Cream

Typical breakfast for a fatatarian. Sour cream from grass fed cows + sharp cheddar cheese + garlic chopped. All wrapped in bacon which was fried in itself but not converted to charcoal like many Americans seem to prefer.

20150914

Tearaway Unfolded PS4 on Wega CRT HDTV

Using an iPad camera to take CRT shots didn't work out at all (severe moire patterns and noise reduction logic getting in the way), so the shots below don't accurately describe what it really looks like...

Tearaway Unfolded on PS4 on these last generation "HD Ready" Wega CRT HDTVs looks fantastic. Absolutely no aliasing at all. The combination of in-game MSAA and 1080p to 720p scan-out scaling in the PS4 works out quite well.

20150911

Self-Correcting Part 2 or Rather a Rant on Why Extreme DoD

A "modern" API effectively coupled to a language: everything revolves around calling "functions", which is a lock-in to a very specific and constrained way of thinking.

What if the API instead is a language agnostic description of data layout, with some protocols (again data layout) for communication (message passing). The "language" need not matter, and is completely replaceable at will. The components which transform the data, aka the nodes in the program's data flow, could be written in any language and are effectively throw-away, replaceable pieces.

The aim is to get to the point where the program is a canvas which is easily and instantly malleable, but still runs at to-the-metal performance, with zero downside to dangerous experimentation --- that instant feedback addiction loop.

GPU provides this natively: dedicated hardware to contain accesses to within resources. Traditionally the data layout is the collection of images and buffers, the format of the data inside those resources, and the rules at which the data can be adjusted. For GPU programming using the "bind-all" style of programming (where there is only one giant descriptor set with everything in it, so that all shaders have access to all descriptors): shaders accessing wrong resources is less of a problem, the larger problem is out of bounds access in a given resource.

On the GPU you can build a pipeline of operations which keeps running even in the presence of bad data. Sure the output may be totally wrong, but it runs. For live compressed video broadcast in the presence of packet loss, you have sweeping I (non-predictive encoded) macro-block(s) which acts as a cleaner which causes the frame to re-converge to correct form when data goes bad. This same concept can be applied to GPU data. Resource caches could have a cleaner which periodically at a slow rate reloads parts of the data from storage. Or with hardware support for async compute, run a very low utilization and low priority background job which rebuilds procedural structures, or validates correctness of various data structures. The robustness of such a system might enable things like partial state saves and then restores from out of sync systems, to work enough to be useful. This also has a relation to maintaining bounded frame rate, designing in ability for the engine to limit itself and scale regardless of input, and perhaps adapt to rapidly varying limits. This isn't really a programming convention for language, it is more about making robust solutions which allow for rapid development.

One of the key components missing from PC GPU APIs is a stable way to mutate the GPU command stream from the GPU, or perhaps this just starts with efficient predication in a given stream: just place everything possible in the baked stream which gets replayed all the time, then use logic embedded in the stream to avoid things which need not run (but with a decision based on active GPU state), and dispatch indirect for variable workloads. This works as long as the kernels/shaders in the graph are constant. When code is specialized instead of data, then the process breaks down. However, specializing code is ultimately what leads to giant bloatware and development grid-lock. Simplification favors data specialization over code specialization. Second issue, when bindings are specialized instead of data, then the process breaks down. This is why I'm a "bind-all" type of person. If I'm stuck with limited bindings I'd rather take the hit using texture arrays.

This is also heavily related to memory organization. I don't dynamically allocate in the traditional sense. I always statically partition into fixed resources with bound limits at start time, with aliasing to maximize utilization. Machines have GB's of memory, why variable size dynamically allocate anything. Use a dead simple fixed size resource pool allocator, which is trivial to implement on highly parallel machines like GPUs.

Getting back to CPUs, having function call interfaces for everything is a disease. What I much rather have is a collection of ports or interfaces in a fixed layout in memory. Starting with something simple like time. If the hardware has an accessible wall-clock time interface, say via some ISA opcode, then I don't need a function to get the time. I just need a convention for this fixed layout in memory of where to find the base time value which I add to the ISA opcode results to get the real time. Now for keyboard access. Just give me a key bitarray at a fixed location in the memory layout. Have a background thread atomically OR bits on key presses, while I atomically AND out bits after I process key presses. How about file access. Just have a convention for maximum number of file handles, maximum path size, a bit array to flag entries which are new requested transactions, a bit array for the OS to reply that a transaction is finished, a convention that lowered array elements (requests) are completed first, etc, setup fixed arrays for this stuff in memory. Everything ends up being, write data to memory, then ring some kind of doorbell, to signal to the OS to get busy. There is no functional interface, just a text document which describes the memory layout and how to use it.

Bringing this back to GPUs, when the GPU can just write into CPU-side memory, and there is some convention for triggering an interrupt, or some OS convention to poll at a rate in which interrupts are not necessary (aka you don't run hot then sleep, but rather stay live at lowest power state, with cores powered down), then the GPU and CPU simply access the same memory as the CPU to communicate with the OS. And perhaps you split the read and write sections of this memory, and not depend on atomics as in my prior examples, etc. New OS functionality doesn't need a new API when the GPU wants to access, the API = dead simple loads and stores.

20150910

September Trip to Iceland

Lodging
Stayed for six days around Reykjavik driving to other destinations, choosing a BnB via www.airbnb.com/s/Iceland. Planning most everything in advance proved very useful as the rental's wifi did not work. Did not data roam on the phone, and most of the interesting places won't have cell reception anyway. Cell phones are effectively useless as they are cloud navigation only devices, and GPS is also mostly fail, as it is impossible to figure out how to input various destinations. Instead had pre-printed paper maps and memorized the route to grocery, etc. Next time I'll try pre-printing the GPS coordinates, and standard full addresses as well.

Auto Rental
Rented a manual Suzuki Jimmy 4x4 from Budget. At first they didn't have a Jimmy and forced us to get an "upgrade" to a Nissan Qashqai. This was a serious downgrade. Avoid the Nissan Qashqai at all costs: it has a horrible computer controlled throttle which partly takes over during shifts, it auto turns off the engine when you are braked in neutral, it's clutch feels like it does not exist, and it drives like a front-wheel-drive car instead of a 4x4. Lucky for us the previous renters had topped off the tank with petrol instead of diesel. Early in the trip, I noticed what felt like a bad fuel pump, so I returned it. The girl at the rental return didn't notice the problem on a test drive, and started telling me they were going to charge me to fill up the tank on the exchange. Eventually they brought over their mechanic who had the smarts to sniff the diesel tank, and knew exactly what was wrong. Thankfully I left with a Jimmy, and they tossed in a free GPS for the trouble. The Jimmy is great, tiny, easy to heel-toe, a little under powered, ability to go between {2WD, 4WD, and 4WD low}, and fun on non-paved roads. But one word of warning, driving a Jimmy in Iceland's very windy weather can be more of an exercise in sailing rather than driving. Either that or the Jimmy I rented was way out of alignment. Felt like the 4x4 didn't have enough toe-in in the front, very twitchy, near impossible to drive in a straight line at speed with the combination of Icelandic cross winds, warped tyre grooves in the roads, and the wake of large trucks going the opposite direction. Lots of fun.

Food
Lived off cheeses, smoked fish, and water for breakfast. Lots of great places to grab dinner around Reykjavik we liked: Fiskmarkaðurinn, Grillmarkaðurinn, and Forréttabarinn. Short summary: langoustine are quite awesome, horse was fantastic, minke tastes like one would expect from a red meat mammal with a twist, and puffin tastes like a cross between liver and fish. Also managed to catch a live DJ'ed plaza broadcast of the Iceland vs Kazakhstan game one night down-town in the plaza next to the Fiskmarkaðurinn.

Excursions
Found www.extremeiceland.is to be quite useful as it collects a huge amount of options in one place with photos. We did a 2 hour Cessna air tour from www.eagleair.is on our first full day in Iceland. It is the best way to really understand Iceland. The photo in this post was taken on that flight. We pre-booked, and got super lucky because that day was the only day not rained out in the week we were there. Tried to do a RIB boat whale watching tour, but that got canceled due to weather. Did one of the tours to a man-made cave in the Glacier Langjökull, was the wife's favorite part of the trip. The dirt road drive to the base of Langjökull was quite fun, I'd advise just skipping standard hotel to event tour bus options. The South drive to Sólheimajökull has a lot of great waterfalls. Apparently this was a great time to attempt to see the Northern Lights, except the weather didn't work out, and we didn't pre-search a good viewing location (fail on no wifi). Last day tried the Blue Lagoon which seems like a man made pool covered in some mineral sand which gets geo-thermal sea water runoff from the power plant. The contrast between being freezing out of the water and cooked in the water was quite refreshing. I would really like to go back and do the natural ice cave tours in the winter.

Self-Correcting CPU Pipelines

Elaborating an idea which came up in a prior conversation...

The aim is to make CPU programming as fun and easy as iterative run-time edit reload based GPU shader programming. Re-purpose the CPU page tables for intra-app memory protection between in-app tasks. Effectively providing hardware protection for functional programming. When in-app tasks switch, adjust page table protection, then use INVLPG (on 486 and up) to flush TLB entries for changed pages. The page tables change to disallow writes to now read-only data from the prior completed job, and to allow writes to write-able data for the current job. Use x86's support for various page sizes and pre-staged page tables for fixed jobs to make this efficient. Setup a background watchdog to act as a TDR check, to reset to a stable state if any task runs too long (infinite loop, etc). The "kernels" or CPU jobs which transform data can also be designed to be somewhat self correcting, using min or max to limit indexes, etc...

20150829

Ketogenic Diet - Working on Year 2

Part way into year two on a Ketogenic diet, breaking the diet only once and a while on business trips. The diet is basically mostly fat, some protein, with almost no carbs.

Initially established in the 1920s as a way to control seizures for people with epilepsy, the Ketogenic diet is being successfully used as a metabolic treatment for cancer by a few individuals, but is largely being ignored by medical professionals. The diet works by shifting the body's metabolism from glucose (sourced from carbs or converted from excess protein) to ketones produced in the liver (sourced from fat and oil). The diet has natural anti-inflammatory properties. The theory of how a Ketogenic diet fights cancer revolves around the idea that cancer is mostly a mitochondrial metabolic disease. Specifically that cancer cells tend to have damaged mitochondria which switch to a more primitive glucose fulled fermentation as their primary energy generation process. Starving cancer cells of glucose places them in extreme metabolic stress, allowing the body to fight back. One of the primary ways to track cancer is by looking at the process of tumor angiogenesis via periodic MRIs with contrast. Effectively watching over time as the cancer causes the body to develop ever stronger network of blood vessels to feed the cancer with glucose. Successful treatments of cancer can reverse this process. I suspect ultimately that everyone has cancer even if only at some undetectable amount. The question is if the body's balance shifts between a state which enables the cancer to grow, or a state which causes the cancer to die. Cancer becomes terminal when there is no longer a way to shift back the balance.

The Ketogenic diet for me is a lifestyle choice not made out of medical necessity. My personal tastes tend to really align with the diet, and it is a great way to stay in shape, more so when you have a career sitting at a desk typing away on keyboards. Counter to how the media vilifies fat as the source of the nation's obesity problem, it is near impossible to maintain body fat on the diet which involves mostly eating fat: the body is in a constant state of fat burning, instead of fat storage.

Looking back, it was relatively hard to get started. The realization that America's entire food culture and supply chain is optimized for the delivery of carbs, leaves a demilitarized zone filled with land mines for the oil fueled consumer. Just finding things which are in the parameters required for the diet can be quite a challenge. After a while, planning every meal, weighting all ingredients, measuring ketone levels or blood glucose levels, is replaced with driving by feel alone. The transition between carb burning and ketone burning body state goes through a standard process of horrible sugar withdrawal symptoms, bouts of fatigue and brain fog, eventually returning to the feeling of being normal, but then unaffected by the standard cravings carb eaters have. The first transition takes weeks, however after being ketone burning for this long, the transition now only takes me a few days.

Over time the diet becomes as enjoyable as the standard high-carb diet, and even more so in many regards, because of the ability to easily take in 70% fat at a given meal (like bacon wrapped sour cream). Unlike sugar, there is no crash afterwards, and the body provides some rather strong signals to stop eating before you over do it, instead of telling you to keep going as is the standard practice with sugars. Here is an example of the kind of foods my wife and I eat: butter on low heat, mixed in spice, garlic, and boiled shrimp. Consumed head, shells and all, with sour cream on the side straight to bring up the fat content,

Maybe this post should just be called "Indie Shock". Interesting graph below posted on twitter of the number of Steam game releases over time. Saturating isn't it?

Thoughts From Personal Perspective as a Consumer
Engines like Unity and Unreal make it much easier to produce games, but the games tend to be more similar, staying within the limitations imposed by the these mass market engines. Same effect happens as independent engine tech all falls into the same local minimum, or developers limit risk by staying in the confines of well walked genre. This makes it harder for a consumer to differentiate between titles. Choice in a sea of noise is random. It is not as much the content which shapes purchase decision in that case, but rather how the consumer gets directed by marketing.

As it becomes harder to choose, and as more choices result in failure of satisfaction, the barrier to purchase increases, and even the falling price cannot compensate. The price of free is actually quite high: the opportunity cost of doing something more compelling with one's time.

"Nobody Cares" aka the Excuse For Being Mediocre
Why bother investing time to achieve greatness? Proponents of this line of thinking often present justification in the form that the average consumer cannot tell the difference between low and high quality. For a producer this is effectively a self selecting choice to continue to swim in that sea of noise. Some forms of greatness may not be perceived at the conscious level, may not be something a consumer can articulate in words, but instead may only manifest in feel and yet have profound effect.

Outliners
Knowledge of excellence in some aspect which effects only a fraction of the market, say awesome multi-GPU support, establishes a hint that the producer cares about the product at a level beyond serving me a microwaved pre-constructed hamburger. It is very hard to maintain employment of the creative and driven individuals which produce top content without allowing them to strive for greatness, even sometimes at the compromise of maximum profitability.

As a consumer in a sea of noise, I select for the expression of producers looking to be the best that is possible. Who, given the limitation of architecture and time, choose paths which compromise in a way which allows a unique realization of the ultimate form of their art.

20150818

Quick ACES Thoughts

Appears that the RRT global de-saturate step applied in AP1 drops to a gamut smaller than Rec2020. This seems to be ok when targeting Rec709/sRGB but not sure if this is future proof in the context of Rec2020. Seems like the reference ACES ODT for Rec709 at 48 nits ends up with gamut clipping when inputs to the RRT had covered the full positive part of AP1 space. Those working with sRGB/Rec709 primaries in the rendering pipeline might not have issues here depending on how much saturation is added during grading before the RRT. Guessing some people would rather be able to go nuts anywhere in the human perceptual space and have it smoothly map to the output display space?

20150814

The Written Word

Growing older, I find that games, movies, TV are all limiting forms of entertainment, and that by far the best form of story driven consumables is the book. Right now I'm half through On the Steel Breeze by Alastair Reynolds, taking a break to reflect. Something was lost over the years as digital entertainment has evolved from the soup of interactive text adventures. Certainly enjoy the visual representation of a good story, but I enjoy more the freedom to explore stories which could never gain the support necessary for a non-literary translation. Early in gaming there was an interesting balance forced by the limitations of the machine, where the written word took the place of electronically "physically" realizing everything in the game. Would be great once and a while to trade the modern game single player storyline, played out in "cut scenes", with a story of the caliper of a great novel, represented instead in "cut pages" of text. Then shifting the focus of development and polish back into the game itself.

format: plain


text:
Expanded Notation to the Ten Thousands

This Expanded Notation to the Ten Thousands worksheet also includes:

In this expanded notation worksheet, students read the numbers that range to the ten thousands value place. Students change the numbers to expanded notation form.

Concepts

Resource Details


text:
Is LNQ friend or foe?

The BC government has recently reached an agreement to allow the construction of a liquefied natural gas processing and export facility in Kitmat.

The discussion about the project has been a bit similar to the site C discussion. Some mention the economic advantage, others mention local environmental risks. As with the site C, I think that is missing the point. I think we have to focus on the transition to renewable energy sources and the climate change impact.

The bc green party argument is at least focused on green house gasses emissions. But it doesn't look at what LNG might be used for.

According to the lngcanada's website, a target market is Asia, where the gas would be used as a replacement for coal. Since the gas production would be in BC and the coal power plants are not, I think it is important to look at the global balance, not just the BC emissions.

It is clear that LNG is not a renewable energy source. But if it is better than sources like coal, we should consider the possibility that it is a useful tool for the transition. Is it better to burn gas instead of coal while renewable sources come online?

Lets first look at the difference in emissions by burning gas instead of coal. Natural gas is mostly methane, which is the simplest hydrocarbon with a formula $CH_4$. The first thing to notice is that the atomic mass of carbon is 12, while that of hydrogen is 1. That means that even the simplest hydrocarbon is $12/16$ or $75\%$ carbon by mass.

As for $CO_2$, the atomic mass of oxygen is $16$, which means that the the mass of $CO_2$ is $2*16 + 12 = 44$. So $CO_2$ is $12/44$ or $27\%$ carbon by mass.

The available energy from burning methane is $50$ MJ/kg. Since we are interested about the produced CO2, the energy content is $50/0.75$ or $66$ MJ/kg of carbon. For high grade coal it is $32.50$ MJ/kg. This quick calculation matches the claim that per KWh natural gas produces half as much CO2 as coal.

So we have that each Kg of carbon from LNG used in electricity generation saves one Kg of carbon in the atmosphere. Given their atomic masses, a Kg of carbon is present in $16/12$ Kg of methane and $44/12$ Kg of $CO_2$. So it looks like burning 1 Kg of methane produces (and saves) $44/16 = 2.75$ Kg of $CO_2$.

The proposed Kitmat project is expected to produce $14$ mega tonnes ($1.4*10^{10}$ Kg) per year of LNG. The estimates on the green house emissions per year range from $3.4$ to $10$ mega tonnes of $CO_2$ equivalent. That is surprisingly inefficient. The reason for the inefficiency seems to be that methane is, over a $100$ years time frame, $20$ times worse than $CO_2$ for global warming. So a small leak ($5\%$ say) dwarfs other production problems.

Even taking the $10$ mega tonnes $CO_2$ equivalent number, it would seem that if the LNG is used to replace coal than the project would still save $14*2.75 - 10 = 28.5$ mega tonnes equivalent per year.

The total emissions from the project are $14*2.75 + 10$ mega tonnes of $CO_2$ equivalent. That is, $4.85 * 10^{10}$ Kg. Given the $50$ MJ/Kg heat of combustion and a $50\%$ efficient generator, the total electricity that can be generated per year is $1.4*10^{10} * 50*10^6/2 = 3.5*10^{17}J$ or $9.72 *10^{10}$ KWh. So the emissions are about $499$ g/KWh according to this estimate.

The above leaves out transportation inefficiency for gas, but coal mining has its own problems too.

A much more detailed paper using data from actual power plants when looking at whether the US should export LNG arrived at $655$ g/KWh $CO_2$ equivalent. That would still be saving $550$ g/KWh of electricity if replacing coal according to the same paper.

LNG is a much more complicated case than site C, but it seems that LNG can be an useful short/medium term tool for reducing emissions. It is just important be careful on how much methane is leaked.

This also creates an interesting accounting problem on the carbon market. BC should receive credit if it lowers emissions in Asia. The same authors seem to have a paper on the subject.

One last thing that I still agree with the greens is that the project should not be subsidized. If the above analysis is correct, there should be plenty of demand for LNG and a subsidy is just giving away free money.


text:
This page will look better in a graphical browser that supports web standards, but is accessible to any browser or internet device.

Served by Samwise.

# TwoSlabDiffusion

Diffusion through two adjoining slabs with different diffusion coefficients.

Model number: 0212

 Run Model: Help running a JSim model.
Java runtime required. Web browser must support Java Applets.
(JSim model applet may take 10-20 seconds to load.)

## Description

   Two slabs with different diffusion coefficients are placed next to each other. They are
insulated along their lengths, but exposed at their ends. The discontinuity in diffusion
coefficients where the slabs meet is modeled by a continuous function over a single spatial
step. It is essential that the functional equation for the discontinuous diffusion coefficient
be represented by a continuous function for the partial differential equation solvers. Two
approaches are given:

1.) The diffusion is given as a piecewise continuous function joining the two different diffusion
coefficients and linearly changing value from D1 to D2 from b-x.delta/2 to b+x.delta/2.

2.) The diffusion is given by a smooth hyperbolic function.

The analytic steady state solution is from the problem where the diffusion coefficients form a
discontinuous function. The solution for the Steady State Problem is derived from

CanalyticSS(x) = if (x<=b) C1*x+C2 else C3*x+C4,

where the coefficients C1, C2, C3, and C4 satisfy

at x=x.min:   C1*x.min + C2 = Cleft
at x=b:       C1*b     + C2 = C3*b       +C4  (concentration is continuous at x=b)
D1*C1         = D2*C3           (flux on both sides of x=b are in equilibrium)
at x=x.max:   C3*x.max + C4 = Cright.

## Equations

#### Two separate partial differential equation models

$\large {\frac {\partial }{\partial t}}C \left( x,t \right) ={\frac {\partial }{\partial x}} \left( {\it Dx}\,{\frac {\partial }{\partial x}}C \left( x,t \right) \right)$
$\large {\frac {\partial }{\partial t}}{\it C_{tanh}} \left( x,t \right) ={\frac {\partial }{\partial x}} \left( {\it Dx_{tanh}} \left( x \right) {\frac {\partial }{ \partial x}}{\it C_{tanh}} \left( x,t \right) \right)$

#### where the diffusion coefficients as a function of x are given respectively by

$\large {\it Dx(x)} = \left { \begin{array} {l l } {D1} & \quad { x.min \le x
$\large {\it Dx_{tanh}} \left( x \right) ={\it D1}+1/2\, \left( {\it D2}-{\it D1} \right) \left( \tanh \left( {\frac {x-b}{{\it Steepness}}} \right) + 1 \right)$

$\large {\it C_{analyticSS}(x)} = \left { \begin{array} {l l } {\frac { \left( {\it Cleft}-{\it Cright} \right) \left( {\it D2}\,x+{ \it D1} \right) }{{\it D1}\,b-{\it D1}\,{\it x.max}-b{\it D2}+{\it x.min }\,{\it D2}}} & \quad x \le b \\ { } & \quad {} \\ {{\frac {{\it D1}\,x{\it Cleft}-{\it D1}\,x{\it Cright}-{\it Cleft}\,{ \it D1}\,{\it x.max}+{\it Cright}\,{\it D1}\,b-{\it Cright}\,b{\it D2}+ {\it x.min}\,{\it D2}\,{\it Cright}}{{\it D1}\,b-{\it D1}\,{\it x.max}-b {\it D2}+{\it x.min}\,{\it D2}}}} & \quad {x>b} \\ \end{array}\right}$

The equations for this model may also be viewed by running the JSim model applet and clicking on the Source tab at the bottom left of JSim's Run Time graphical user interface. The equations are written in JSim's Mathematical Modeling Language (MML). See the Introduction to MML and the MML Reference Manual. Additional documentation for MML can be found by using the search option at the Physiome home page.

## References

 None.

## Key Terms

Diffusion, slab, two slabs, PDE


text:
Convolutional neural networks are a type of neural network that have unique architecture especially suited to images. They have been spectacularly successful at image recognition, and now power services like the automated face tagging and object search in Google Photos.

In today's post I'll be talking about CNNs and training one to distinguish between images of cats and dogs. I'll be implementing the CNN in Google's TensorFlow deep learning software.

## Cats are better

We’ve got 25,000 pictures of cats and dogs from Kaggle’s Dogs vs. Cats competition. This is what they look like:

Obviously, a computer can’t “see” a picture the way we do. To the computer, a colour picture is typically represented by a 3-dimensional array of numbers. All the pictures we’re using today are 64 pixels in height and 64 pixels in width, and then each pixel is defined by three integers: one each for the red, green, blue channels:

If you want to distinguish a cat from a dog, then you need to look at things like ears, whiskers, tails, tongues, fur textures, and so forth. These are the features that we (humans) use to discriminate. But none of these features are available to a computer, which knows only 12,288 independent integers (64x64x3).

At the pixel level, these two pictures are completely different. They would have virtually nothing in common. Yet they are unmistakably both dogs. And, again, that’s because we can abstract higher-level features from groups of pixels.

Two dogs that are similar or even identical but slightly rotated will seem completely different to a computer.

So, how can a computer distinguish cats from dogs?

## No, dogs are better

Any machine learning technique that tries to classify images by simply using the 12,288 (64x64x3) raw pixel values as independent features is going to have a bad time. Indeed, any of the classical predictive modelling / machine learning techniques - logistic regression, decision trees, multilayer perceptrons - all perform lacklusterly. They essentially approach the problem as finding a decision boundary in 12,288-dimensional vector space.

Archetypal MLP and illustrative decision boundary

On their own, each of those 12,288 dimensions tells us nothing about the content of the picture. Animals will appear in different positions and sizes in every picture, so it's pointless to look for associations between pixels and animals.

To truly learn to tell cats from dogs, the machine needs access to features that can distinguish them: ears, whiskers, tails, tongues, fur textures, and so forth. These don’t exist in individual pixels, but rather in configurations of groups of pixels.

## Convolutions

The main innovation of the convolutional neural network is the “convolution layer.” A convolution layer applies a set of "sliding windows" across an image. These sliding windows are termed filters, and they detect different primitive shapes or patterns.

Let's start with the intuition. This is oversimplifying things a lot, but imagine that our filters are like sliding windows that are 3x3 pixels in size. Three possible filters might be:

The filter on the left might activate strongest when it encounters a horizontal line; the one in the middle for a vertical line.

In the convolution layer, the filters are passed across the input, row by row, and they activate when they detect their shape. Now, rather than treating each of the 12,288 pixel values in isolation, the "windows" treat them in small local groups. These sliding filters are how the CNN can learn meaningful features and locate them in any part of the image.

That's the intuition. Now, let's be more precise. Our images are three-dimensional arrays and so our filter is also a three-dimensional array. In the CNN we’ll fit below, the first convolution layer uses filters that are 3x3x3 arrays. Filters are “slid” across the image by taking the dot product between it and each 3x3x3 chunk of image. This results in a two dimension output:

In the first convolution layer of our CNN, there are 32 filters. So, the resulting output is 32 arrays that are size 64x64. These can be visualised to understand what each filter is doing (which we’ll do below).

Like most “deep learning” networks, CNNs tend to have many layers. The one we’ll fit below has nine. The intuition being that higher layers will extract successively higher-level (or more complicated) features. For example, lower layers may learn simple edges or lines, and subsequent higher layers can learn features like shapes (such as ears, noses, etc.).

The ultimate genius of the CNN is the network's ability to automatically discover and learn its own discriminative features. Unlike earlier attempts at computer vision, we humans don't need to supply the machine with any hardcoded rules or any fancy preprocessing (such as edge detection). (The downside is their insatiable appetite for training samples).

## Implementation

Software: Our CNN is implemented with Google's new-ish TensorFlow software. TensorFlow is built for speed, which is crucial for the huge computation required to train a large neural net. To achieve that speed, TensorFlow doesn't run "in" Python. Instead, we use Python to define TensorFlow "sessions" which are then passed to a back-end to run. To a Python coder, this makes programs seem a little odd at first. But the TensorFlow "back-end" architecture works very well, and I love that it is so flexible to happily run on CPUs, GPUs or in a distributed environment.

TensorFlow also streamlines defining the network architecture. That said, it wasn't streamlined enough for me, and for ultimate laziness I'm using the tflearn library.

(In case you were wondering: a tensor is a term for an any-dimensional array. Instead of "dimensions," tensors have “rank.” So, a two-dimensional array is a matrix, or a rank two tensor. A three-dimensional array might be called a “cube” of data, or a rank three tensor. Personally, I’m going to find it hard not to say "array" even if I mean "tensor.")

Sample: Our sample of 25,000 images may sound like a lot but it's not. In fact, it's tiny by deep learning standards. For a machine to learn from data that is as hugely variant as images requires huge training samples. There's a few tricks we can use to eke out a bit more information from our sample: one is to randomly apply flips or small rotations to our images as we are training. The resulting model will be better generalised.

Cat, at slight angles

Network architecture: Our network has 9 layers, including 3 convolution layers. (The dropout is usually considered a "layer"). Here's the full code [^1], including importing data, preprocessing it, defining the model architecture and then training it.

One thing I'll point out is that our convolution layers are using "ReLU" activation functions, as opposed to the sigmoid activation function which we used in our prior post on neural net autoencoders. A "rectified linear unit" is defined as f(x) = max(0,x), which looks like:

It's absurdly simple. The sigmoid function was, for a long time, the default activation function for neural networks. ReLU is certainly more common in deep learning nets, I think because they require less computational effort.

The model is 'fit' - by which I mean an optimal set weights are found - via backpropagation and stochastic gradient descent. (Reminder: We looked at gradient descent in an earlier post, Real-time learning in data streams using stochastic gradient descent, and neural net backpropagation in How neural net autoencoders can automatically abstract visual features from handwriting). A neat benefit of training with gradient descent is that it's super-easy to resume training if new data appears. These things are expensive to train, but once it is then we can cheaply continue to update it forever.

Despite the small sample size and small network (9 layers is pretty small for deep learning), the computation required to train this CNN is significant. Across all layers, there's 8,446,466 weight and bias parameters to learn! On a Google Compute Engine instance with 16 vCPUs, 100 epochs took around 5 hours (cost: ~AUD\$5), ultimately achieving a train accuracy of 98.2%. Neural nets are notorious for overfitting and, unsurprisingly, the test results are substantially lower (~88%).

TensorFlow's TensorBoard gives us lots of charts and diagnostics, including:

## What has it learned?

CNNs are very black-boxy and it’s hard to get any kind of understanding of what they have learned. This is because there are so many layers, and the deeper layers - which are supposedly the ones that learn the “higher-level” features - are so far removed from the input images.

We can get a feeling for what the first convolution layer is doing. I don’t see much point in plotting the 32 filters (they’re only 3x3x3), but we can feed that layer an image and visualise its outputs to understand what its filters do.

What is remarkable is that the layer has learned a variety of filters which can detect edges and separate elements of the picture. Most importantly, some filters isolate the cat from the background. We haven’t had to supply any edge-detection algorithms - the CNN has learned its own. And plainly that’s a useful thing: being able to isolate the animal from the rest of the image is step one towards identifying what it is.

Here’s one more example, this time with a heat-map gradient:

Here is the crude, hacky code which I used to generate these plots:

Understanding what the deeper layers are doing is not so easy. An intriguing approach is described in this paper, where the authors use a "deconvnet" to map intermediate layers back to input pixel space.

## How good is our CNN?

Sadly, it's a long way short of state-of-the-art. The winner of Kaggle's Dogs vs. Cats competition achieved 98.9% test accuracy.

How to get to 98.9%? There's a lot of effort required to eke out those extra percent. They include things like:

• Bigger networks with more layers: ResNet - the winner of the 2015 ImageNet Large Scale Visual Recognition Challenge (ILSVRC) - has 152 layers. (And if that wasn’t enough, to win they competition they used an ensemble of ResNets). Paper here.
• Pre-training: the winner of the Kaggle Dogs vs. Cats competition wrote, "My system was pre-trained on ImageNet (ILSVRC12 classification dataset) and subsequently refined on the cats and dogs data" [italics mine]. The ImageNet ILSVRC12 dataset contains 10m labelled images depicting 10k objects. Even if there aren't many cats and dogs in the pre-training data, it helps the CNN learn useful filters for distinguishing objects in images. This is sometimes called "transfer learning." (Also, it should go without saying that more training sample is always going to help).
• Larger, higher-resolution images: In this tutorial, I chose to downsize images to 64x64 to reduce computational demands. But downsizing sacrifices information; larger images have more detail and afford larger filters.
• Bagging, ensembles and using CNNs as inputs to other ML techniques: the 8th placed contestant in Kaggle's competition described some of their approaches on their blog.

But I think the results we've gotten from a fairly vanilla CNN are pretty great, especially considering how little code & effort was required. And let's put it in historical context: in 2007, computer security researchers were saying that machines would not surpass 60% accuracy at distinguishing cats from dogs "barring a major advance in machine vision" or a "major AI advance." (see Asirra: A CAPTCHA that Exploits Interest-Aligned Manual Image Categorization).

## The end

That's it. I've simplified CNNs considerably because I wanted to concentrate on the intuition. For those who want more, I highly recommend the notes from Stanford CS231n: Convolutional Neural Networks for Visual Recognition. I also found An Intuitive Explanation of Convolutional Neural Networks very helpful for its illustrations of how filters work.

In the next post we'll be looking at another type of deep learning, the Long Short-Term Memory (LSTM) neural network, which specialises in learning complex sequence patterns such as we find in language or music.

[^1]: Acknowledgements: this code was based on the tflearn CIFAR-10 CNN tutorial code, which itself seems to be basically an implementation of Google's TensorFlow CNN CIFAR-10 tutorial code.


text:
# A point in the plane: positions regarding a circumference

When we have a circumference on the plane, a point can be in three different positions regarding the circle we have in the drawing:

• Point outside the circumference

If the distance from the point to the center point of the circumference is greater than the length of the radius.

• Point on the circumference

If the distance from the point at the center of the circumference is exactly equal to the length of the radius of the circumference.

• Point within the circumference

If the distance from the point to the center of the circumference is less than the length of the radius.