OpenLLM-France/wikimedia huggingface dataset:
# Muggles' Guide to Harry Potter/Magic/Priori Incantatem
## Overview

Rather than a spell, Priori Incantatem is an effect that occurs when two wands that have magical cores deriving from the same source are used against each other. One or the other of the wands is forced to regurgitate the last spells that it was used to cast. The effect is very similar to the spell Prior Incantato.

## Extended Description

This effect is seen near the end of Harry Potter and the Goblet of Fire during the graveyard battle between Voldemort and Harry Potter. Both Harry's and Voldemort's wands are powered by tail feathers given by Fawkes. When they simultaneously cast spells at each other, this effect appears. A fiery stream joins the two wands, forming a golden light that envelops Harry and Voldemort; there are fire beads on the stream between the two wands, which Harry thrusts backwards into Voldemort's wand, forcing it to disgorge its past few spells. The spirit "echoes" of Cedric Diggory, the muggle Frank Bryce, Bertha Jorkins, and Harry's mother and father, who were the last people murdered using Voldemort's wand, appear as ghostly simulacra of their living selves.

## Questions

Study questions are meant to be left for each student to answer; please don't answer them here.

## Greater Picture

We learn much later that this also has the effect of transferring some of the powers of one wand into the other. In this case, Harry, being the stronger wizard for reasons that are discussed elsewhere, manages to force Voldemort's wand to disgorge its most recent spells, and in the process gains some of the power of Voldemort's wand.
# Muggles' Guide to Harry Potter/Magic/Point Me
## Overview

The Point Me charm, or Four-Point-Spell, makes a wand turn so that it points north.

## Extended Description

This spell was used by Harry in the Third Task maze in Harry Potter and the Goblet of Fire. Knowing that he had to travel roughly north-west from the entrance of the maze to reach the center, he was able to use this charm at several points in the maze to correctly select a direction to travel in.

## Analysis

Basically, this spell is a magical equivalent of a Muggle compass. it is, however, slightly more useful as a wizard will have his wand with him all the time; there is no need to carry a compass in addition to the wand.

## Questions

Study questions are meant to be left for each student to answer; please don't answer them here.
* What would the disadvantage be, to a wizard, of carrying a compass? Is there some reason, apart from the small effort needed to carry an additional item, that a magnetic compass would not work?
# The Devonshire Manuscript/Spight hathe no powre to make me sadde

* ←the losse is small to lose suche on || width="200" align="right" | Grudge on who liste this ys my lott→
* The Devonshire Manuscript facsimile 78r
f. [78r] 1 Spight hathe no powre to make me sadde /and thys 2 Nor scorenefulnesse to make me playne / 3 yt dothe suffise that on{_o}ns I had 4 and so to leve yt is no payne /$^1$ 5 Let thim frowne on that leste dothe gaine 6 who ded reioise maist nedes{es} be gladd 7 and tho with{w+t+} wordis thou wenist to rayne 8 yt dothe suffise that on{_o}ns I had 9 Sins that in chekes{es} . thus overtwawerte 10 and coylye lookis thou doste delight 11 yt dothe suffise that myne thou warte 12 tho change hathe put thye faithe to flight 13 alas it is a pevishe spight 14 to yelde the silf and then to parte 15 but sins thou seiste thie faithe so light 16 yt dothe suffise that myne thou[[The Devonshire Manuscript/Appendix_I:_Paleographic_Features|{{th}+u+}]] warte 17 And sins thye love dothe thus declyne 18 and in thye herte suche hate dothe growe 19 yt dothe suffise that thou warte myne 20 and with{w+t+} good will I quite yt soo. 21 some tyme my frinde fare well my fooo 22 sins thou change I am{_a}m$^2$ not thyne 23 but for relef of all my woo / 24 [[The Devonshire Manuscript/Appendix_I:_Paleographic_Features|{{th}+t+}]][[The Devonshire Manuscript/Appendix_I:_Paleographic_Features|{{th}+u+}]] yt dothe suffise thatthou warte myne / 25 prayeng you all that[[The Devonshire Manuscript/Appendix_I:_Paleographic_Features|{{th}+t+}]] heris this song 26 to iudge no wight nor none to blame 27 yt dothe suffise she dothe me wrong 28 and that herself doth kno the same / 29 And tho she chang it is no shame 30 theire kinde it is & hathe bene long 31 yet I pro{p2}teste she hathe no name / 32 yt dothe suffise she dothe me wrong / fs

## Notes & Glosses

1. There is a space between this line and the next.
 2. This is an example of an "unneeded" consonant, at least according to a modern perspective.

## Commentary

Attributed to Sir Thomas Wyatt, this poem was entered by H8. The speaker refuses to remain saddened by love now lost and describes the lady's fickleness as a natural quality of a woman's temperament. He is satisfied to have possessed the lady’s love at one time. For another example describing this perspective concerning womens' fickleness, see the poem “Dyvers dothe vse as I have hard & kno” (77v).
This poem is one of seventeen entries where Margaret Douglas marks “and thys.” Paul Remley has suggested that these annotations relate to another in-text annotation of hers, “lerne but to syng it” (on "now all of chaunge" (81r)), and may indicate a group of texts to be learned for entertaining.

#### Works Cited

* ↑ R.A. Rebholz, ed. Sir Thomas Wyatt: The Complete Poems. London: Penguin, 1978. 242-43.
* ↑ Paul Remley. "Mary Shelton and Her Tudor Literary Milieu." Rethinking the Henrician Era: Essays on Early Tudor Texts and Contexts. Urbana: University of Illinois Press, 1994. 50.
# The Devonshire Manuscript/Sins you will nedes that I shall sing

* ←Ye know my herte my ladye dere || width="200" align="right" | Ons me thought fortune me kiste→
* The Devonshire Manuscript facsimile 73v
f. [73v] and thys 1 [[The Devonshire Manuscript/Appendix_I:_Paleographic_Features|{{th}+t+}]]{es} Sins you will nedesthat I shall sing 2 take yt in wo$^r$th siche as I have 3 plentye of plaint mone & mo$^r$nin{_i}g 4 yn depe dispaire / & delye payne 5 boteles for boote crying to crave 6 to crave yn vayne / 7 {d,}{w+t+} {m'} {_a} Suche hammers worke within my hede 8 that sounde nought els vnto my eris 9 but faste at borde / & wake abede{d,} 10 suche tune the tem{_e}pre to my song 11 {_a}{y+t+} to waile my wrong that I wante teris 12 to waile my wrong 13 Dethe and dispaire afore my face 14 my dayes dekaes$^1$ my grefe doth gro 15 the cause thereof is in this place 16 whan crueltye dothe still con{_o}straine 17 for to reioise tho yt be woo. 18 to here me plaine 19 A brokin lute vntunid stringes{es} 20 with{w+t+} such a song maye well bere part 21 {es}[[The Devonshire Manuscript/Appendix_I:_Paleographic_Features|{{th}+t+}]] that nether pleasith him that singes 22 nor them that[[The Devonshire Manuscript/Appendix_I:_Paleographic_Features|{{th}+t+}]] here / but her alone 23 that with{w+t+} her herte wold straine my herte 24 to here yt grone / 25 Yf it greve you to here this same 26 that you do fele but in my voyse 27 considre then what ples$^a$unt game 28 I do sustaine in everye parte 29 to cause me sing or to reioise 30 with{w+t+}in my herte / fs

## Notes & Glosses

1. Such a grammatical error is so unusual that it is likely the scribe erred in pluralizing 'dekaes.'

## Commentary

Attributed to Sir Thomas Wyatt, this poem was entered by H8. This poem is is also one of seventeen entries where Margaret Douglas marks “and thys.” Paul Remley has suggested that these annotations relate to another in-text annotation of hers, “lerne but to syng it” (on "now all of chaunge" (81r)), and may indicate a group of texts to be learned for entertaining. Although Douglas's annotation appears above this poem, it may refer to both lyrics on the page.

#### Works Cited

* ↑ R.A. Rebholz, ed. Sir Thomas Wyatt: The Complete Poems. London: Penguin, 1978. 153-54.
* ↑ Paul Remley. "Mary Shelton and Her Tudor Literary Milieu." Rethinking the Henrician Era: Essays on Early Tudor Texts and Contexts. Urbana: University of Illinois Press, 1994. 50.
# The Devonshire Manuscript/Stoppe me of my

* ←And who that sayth that for to love ys vyce || width="200" align="right" | for who so ends→
* The Devonshire Manuscript facsimile 93r
* The Devonshire Manuscript facsimile 92v
f. [92v] f. [93r] 1 Stoppe me of my 2 who my paynys 3 asslake y 4 For elles come deth 5 and shertly me take

## Commentary

The page was torn lengthwise, which removed some writing. This lyric has four poetic lines on five graphical lines. The scribe seemed to enter the lyric to fit within the tear (see also "but now helpe god to quenche all thys sorow" (93r) on the same page). Both the verse and the hand remain unidentified. The page was probably torn during the time of active involvement in the compilation since the style of handwriting matches the rest of the manuscript.
# OpenGL Programming/Basics/LinesPoints

Note that this is for very outdated versions of OpenGL.
# OpenGL Programming/Basics/Rectangles
## Drawing Rectangles

Recall from the previous chapter our basic structure for OpenGL/GLUT applications.
We're now going to add some things to the setup and display functions so we can draw a rectangle.

### Changing the Background Colour

Let's add a line to our setup function:
Calling glClearColor with these arguments will change the background color to white. For now, we're going to leave this line as is without explanation. We'll return to what the 1.0f mean later.

### Preparing to Draw

To allow us to draw, GLUT needs to clear the screen every time we work. This is accomplished through two functions, one at the beginning and one at the end of our display function:
By using glClear, we give ourselves a clean slate to work on; everything that was in our buffer (the place in memory where we store the rendering image) before is gone. We're now using a new buffer, so at the end of the function, we need to switch that buffer into our window. In GLUT, this is accomplished through calling glutSwapBuffers.
Don't worry if you don't fully understand why these two functions exist just yet. You'll have time to learn.

### Okay, NOW can I draw?

Let's add a function to display that will give us a simple rectangle:
Again, ignore the arguments to glColor3f. Just trust us for now that this will make our rectangle black, so we can see it against the white background. Then we actually draw the rectangle using the function glRectf. We pass in as parameters to glRectf two sets of numbers: the x and y coordinates for one vertex of the rectangle you want to draw, and the x and y coordinates for the opposite vertex. An important thing to note is that these x and y coordinates are not given in pixels, but rather in viewport coordinates.

### The Viewport

You'll notice, if you compile and run the program using the display function above and then resize the window, that your rectangle will grow and shrink as your window does. In this example, the rectangle will take up exactly 75% of the width and 75% of the height of the window. This is because we haven't set our viewport.
The viewport defines how coordinates are mapped from OpenGL space, which uses floating point numbers, to the window space which obviously uses pixels. By default, the viewport assumes that the top left is (-1, 1), the bottom left is (-1, -1), the top right is (1, 1) and the bottom right is (1, -1), regardless of the window position.
# OpenGL Programming/Basics/Transformations
## Transformations

In preparation for drawing more complex 2D and 3D shapes, we should understand what transformations are. Transformations allow you to move objects around your window, as well as rotate and scale them.

### Translations

Translations allow you to draw objects up, down, left, and right in your 2D scene. (When we get to 3D, you'll be drawing using depth coordinates too.) Just like we positioned points and lines, we translate around the scene in preparation of drawing an object in that place.
Translations are accomplished using:
Let's demonstrate how translations work by editing the display function of our basic OpenGL template.
Here, we set the color to black using glColor3f, then translate 0.5 up and 0.5 to the right. (We haven't talked about Z much yet, so we'll just leave that 0.0 for now.) The result is a teapot drawn in the upper right hand corner of the screen.
# Mesa

If you are using the Mesa OpenGL implementation you can set the following environment variables:
* LIBGL_ALWAYS_SOFTWARE=1 : use the software implementation, without using the graphic card at all. This help when:
** you suspect a bug in a driver,
** you want to try an alternative implementation (as if you were using a different graphic card),
** you want to check whether a graphic glitch is due to unitialized memory or to a programming mistake
* MESA_DEBUG=1 : will output diagnostic messages in erroneous situations (e.g. assigning a uniform when the program is not linked)
See also Mesa's debugging and environment variables pages.

# Common mistakes

If you manually draw lines or triangles, and nothing appears:
* check that your 4th coordinate is 1 and not 0
* check that you properly set glEnableVertexAttribArray / glBindBuffer / glVertexAttribPointer
* double-check that you used the right variables (bad copy/paste...) - avoid global variables to help this
* triple-check your glUniform* calls, including the type (3fv, 4fv...) - OpenGL is unforgiving and silent
* beware that glDrawElements' 4th and last parameter (indices) is expressed in byte offset from the start, not in number of elements from the start, even when working with IBOs

# Error reporting

OpenGL uses glGetError to report errors:

# Stencil buffer

For tips on how to debug the stencil buffer, you can check the Stencil buffer section.

# Links

* Debugging of Shaders in the GLSL wikibooks (about debugging with colors)
* Debugging Android NDK for debugging OpenGL NDK application on Android
- Recent stats
< OpenGL Programming
# OpenGL Programming/Basics/NamingConventions
## Naming Conventions

Now that we've used some OpenGL functions, it's time we understood what those 3fs meant in those functions we've been using.

### OpenGL Functions

OpenGL functions are always named in the following manner:
    First comes the prefix. In this example, gl- refers to a built-in OpenGL function. Functions from GLUT will be prefixed with glut- instead. Later, we'll see that GLU functions are similarly prefixed with glu-.
    This is followed by the actual function name. Here, we're changing a color, so we provide Color as our function name.
    Next comes the number of arguments we plan to give to the function. Here we want to give it 3 arguments, so we write 3. In functions with an unfixed number of arguments (e.g. glTranslatef), this number is omitted.
    Following the number of arguments, we have the type of arguments we plan to give. This can be either b, s, i, f or d in most cases, standing for byte, short, integer, float or double respectively. Use ub, us, ui for unsigned byte, short or integer. Append a v here to pass an array instead of separate arguments.
    Finally, we have the actual arguments.

#### Pick Your Battles, Pick Your Arguments

Many functions are available with a different number of arguments. For example, the function glVertex2f which we used in the last chapter takes 2 float parameters, x and y:
may also be called with a third parameter, z, by using:
or with integers instead of floats:
or with an array of three floats:

### OpenGL Data Types

OpenGL defines some data types that are preferable to the built-in C data types. The more commonly used ones are:
* GLenum
* GLboolean
* GLvoid
* GLbyte
* GLshort
* GLint
* GLubyte
* GLushort
* GLuint
* GLsizei
* GLfloat
* GLdouble
Most of these are self explanatory. GLenum refers to a constant, and any type that starts with u means unsigned. All these types are equivalent but preferable to their C counterparts when writing OpenGL code.
# Introduction

In real life, cameras that use lenses can, in principle, not get everything they see in focus at once. Only objects near certain distance from the camera (the focus distance) appear sharp. This area is called the depth of field. Objects that are closer to the camera or that are further away appear unsharp. How unsharp the objects that are not at the focus distance are depends on the shape and size of the aperture of the camera. Normally, the GPU will render everything infinitely sharp, however there are various techniques to simulate the depth-of-field effect. The most accurate one is to use the accumulation buffer, and it is also very easy to implement. Basically, we render the scene multiple times with slightly different MVP matrices, to simulate light rays passing through different parts of the lens aperture. The shape of the aperture, formed by the lens diaphragm, influences the way objects that are out of focused are blurred. This is called bokeh.

# Simulating depth of field using the accumulation buffer

Suppose we start with the following code that sets up the model-view-projection matrix, and then renders a frame:
Where eye is a vector containing the position of the eye or camera, object is the position of the object we want to be in the center and in focus, and up is a vector describing which way is up. To simulate a circular aperture, we move around the camera in a circle in the plane perpendicular to the direction we are looking at. We can easily get two vectors describing the plane using cross products.
If we would just move the camera around and not change the direction it is looking at, we would just blur most of our scene. However, the trick is that we keep looking directly at the object we want to be in the center and in focus. This is easy to do, we just have to pass the coordinates of that object as glm::lookAt's second parameter. The object we are looking at will always be exactly in the center of the screen, not moving around, so it will not be blurred. The rest will be blurred depending on the depth relative to our center object.

# Exercises

* Apply this technique to any of the previous tutorials that use glm::lookAt.
* Change the value of n and aperture.
* Most camera diaphragms are not truly circular, but are polygonal. Try simulating a square or hexagonal diaphraghm.
* Can you combine this technique efficiently with anti-aliasing and/or motion blur?
# Concept

We analyze the object:
* Minimum coordinates in X, Y and Z
* Maximum coordinates in X, Y and Z
* We compute the size necessary for the object: max-min in X, Y and Z
* We compute the center of the object: (min+max)/2 in X, Y and Z
We compute of cube around the object:
* We prepare a cube of size 1 (1x1x1), centered on the origin
* We scale it by the size of the object
* We center it on the object
To draw the cube:
* We draw the front face using 1 looping line
* We draw the back face using 1 looping line
* We draw 4 orthogonal lines to join both faces

# Intersection with surfaces

As seen in Scientific tutorial 05, you can improve situations where lines and surfaces are mixing, by using:
Keep GL_POLYGON_OFFSET_FILL enabled even after you draw the lines, it needs to be enabled when drawing the surfaces as well.
You can also increase the line thickness if need be:
- Recent stats
< OpenGL Programming
# Old Norse/Grammar/Adjectives and Adverbs

Strong Adjective Declension :
| Singular | Singular | Singular | Singular | Plural | Plural | Plural |
| Case | Masculine | Neuter | Feminine | Masculine | Neuter | Feminine |
| Nominative | -r | -t | -(u-umlaut) | -ir | -(u-umlaut) | -ar |
| Genitive | -s | -s | -rar | -ra | -ra | -ra |
| Dative | -um | -u | -ri | -um | -um | -um |
| Accusative | -an | -t | -a | -a | -(u-umlaut) | -ar |
Weak Adjective Declension :
| Singular | Singular | Singular | Singular | Plural | Plural | Plural |
| Case | Masculine | Neuter | Feminine | Masculine | Neuter | Feminine |
| Nominative | -i | -a | -a | -u | -u | -u |
| Genitive | -a | -a | -u | -u | -u | -u |
| Dative | -a | -a | -u | -um | -um | -um |
| Accusative | -a | -a | -u | -u | -u | -u |
Note the weak declension here, neuter is always 'a.' Masculine is 'i' in the nominative, but 'a' elsewise. The plural is 'u' except the dative 'um' ending.
# Old Norse/Grammar/Alphabet and Pronunciation
## The Old Norse Alphabet

The Old Norse alphabet consisted of the following lettersː a b c d ð e f g h i j k l m n o p q r s t u v w x y z þ æ ǫ ø œ
This is based on the more modern 'standardized' spelling, as older texts in most every language lacked unified spelling standards, meaning the same word could appear in several different ways within the same text. The above Latin alphabet will be used in this page for all words in Old Norse.

## Consonants

Consonant chart :
| Consonant | IPA | English example |
| b | /b/ | boy |
| c | /k/ | call |
| d | /d/ | dog |
| ð | /ð/ | this |
| f | /f/ /v/ | far (initial) very (middle or final position) |
| g | /g/ /x/ /ɣ/ | good (initial, after n) Scots loch (before s or t) Scots loch (otherwise; voiced) |
| h | /h/ | have |
| j | /j/ | year |
| k | /k/ /x/ | call loch (immediately before s or t) |
| l | /l/ /l̥/ | leaf leaf (voiceless directly after h at the beginning of a word, ends of words after voiceless consonants or between voiceless consonants) |
| m | /m/ | man |
| n | /n/ | new |
| p | /p/ /f/ | happy far (before s or t) |
| q | /k/ | call (only in qu) |
| r | /r/ | roof (trilled like Scottish) |
| s | /s/ | safe |
| t | /t/ | time |
| v | /v/ | victory |
| w | /w/ | win |
| x | /x/ | lochs (Scottish) |
| z | /t͡s/ | cats (like German z) |
| þ | /θ/ | thin |

## Vowels

Vowel chart :
| Vowel | IPA | English example |
| a | /a/ | father (short) |
| á | /aː/ | father (long) |
| e | /e/ /ɛ/ | é as in French 'été' (short) |
| é | /eː/ | é as in French 'été' (long) |
| i | /i/ | ee as in feet (short) |
| í | /iː/ | ee as in feet (long) |
| o | /o/ | o as in vote (short) |
| ó | /oː/ | o as in vote (long) |
| u | /u/ | u as in droop (short) |
| ú | /uː/ | u as in droop (long) |
| y | /y/ | ü as in German München (short) |
| ý | /yː/ | ü as in German Füße (long) |
| æ | /æ/ /ɛ/ | a as in 'cat' (long) |
| ǫ | /ɔ/ | o as in 'lot', (short) |
| ǫ́ | /ɔː/ | o as in 'lot', (long) |
| ø | /ø/ | eu as in French 'feu' |
| œ | /øː/ | eu as in French 'feu', (long) |

## Diphthongs

Diphthong chart :
| Diphthong | English example |
| au | ow as in 'now' |
| ei | ay as in 'hay' |
| ey | combination of ON e+y |
Examplesː
* baugr (bäʊ̯ɣʀ)
* heitir (heɪ̯tiʀ) (hay-tir)
̈Similar to other Germanic languages, the vowel change, or umlaut, operates in Old Norse. There are two kinds: i-umlaut, and u-umlaut.
The i-umlaut appears thus:
I-umlaut chart :
| Underlying vowel | I-Umlaut vowel |
| a | e |
| á | æ |
| o | ø |
| ó | œ |
| u | y |
| ú | ý |
This is the fronting of a back vowel (a, o, u) to its frontal version, similar to how German has (a, o, u) become (ä, ö, ü).
In certain circumstances, the presence of a 'u' in the endings of adjectives or nouns causes what is called 'u-umlaut' or 'back mutation' to the stem vowel. This is how that change presents itself:
U-umlaut chart :
| Underlying vowel | U-Umlaut vowel |
| a | ǫ |
| á | (ǫ́) > á |
| e | ø |
| é | œ |
| i | y |
| í | ý |
| a (unstressed) | u |