Help me understand this terrain intersection algorithm

I was looking for a fast way to get a ray intersection point of a terrain defined by a heightmap and I stumbled upon this: https://publications.lib.chalmers.se/records/fulltext/250170/250170.pdf

At part 3.2, I don’t quite understand why would we get an intersection point in the beginning of the while loop since it starts with the first quadtree node which is basically the whole map thus there shouldn’t be an intersection point with the ray (expect if the ray starts out of AABB, higher than the max height of the terrain but that is never the case for me).

Thank you very much if someone could make this thing clear.

python – Classes – something ive found a ton of resources about, but cannot understand this specific bit

to preface this, I have searched and read so much, I understand (I think….) methods, classes and functions.

What I am trying to wrap myhead around is… a class is essentially a blueprint…? using humans as an example, I create a Human class, and within this class I have different functions based on name, age and height.

``````class Human():

def __init__ (self):
return

def name(self,name):
self.name

def age(self, age):
self.age

def height(self,height):
self.height

def person (self,name,age,height):
return f'Hello, my name is {self.name}, I am {self.age} and {self.height} Tall'
``````

Then I want to create two (or as many as I want) humans. So i create an instance of the human class as the blueprint….

``````import mod

people = mod.Human()
``````

so now I want to create my two people (that are humans and should have a name, age and height associated with them)…

``````Liam = people.person('liam', 28, "6'" '2"')
Tori = people.person('Tori', 29, "5'" '8"')
``````

So at this point, is my understanding of classes/functions and my utlization of them correct?

``````print(Liam)
``````

When I print this out I get;

``````Hello, my name is <bound method Human.name of <mod.Human object at 0x0353E628>>, I am <bound method Human.age of <mod.Human object at 0x0353E628>> and <bound method Human.height of <mod.Human object at 0x0353E628>> Tall
``````

I had this bit working earlier when I created my person through two lines of code instead of one. But this isnt what I was after (one line per person created is what I am after).

``````class Human:

def __init__(self, name, age, height):
self.name = name
self.age = age
self.height = height

def person (self):
return f'Hello, my name is:  {self.name}, I am {self.age} and {self.height} Tall'

import mod

liam = mod.Human('liam', 28, "6'" '2"')
LiamFull = liam.person()

print(LiamFull)

Hello, my name is:  liam, I am 28 and 6'2" Tall
``````

functional analysis – Trying to understand definition of Lie ideal for C*-algebras

Let $$A$$ be a $$C^*$$-algebra. A sub space $$I$$ of $$A$$ is called Lie ideal of A if $$[I,A]= IA-AI subset I$$

Since I contains $$0$$, isn’t it this definition equivalent to definition of two sided ideal of $$C^*$$-algerba?

Most probably I’m missing something in the definition of Lie ideal. Any ideas?

I still don’t understand this. Can you show the work so I can understand? The link shows the problem.

https://i.postimg.cc/xjmZSHZM/41012-BA9-7412-4-D1-F-9-D3-F-EDF705-B90-F7-E.jpg
…………………………………………………………

What’s the best article to read and understand about cryptocurrency airdrops? The article should be easy to understand for the newbies of cryptocurrency. There are plenty of airdrops , but most of people don’t know how to participate in an airdrop and how to trade those airdrop tokens.

Specs being agreed on and then those specs being placed into production are two different things.

Yes, the final PCI Express 5.0 specs was introduced in May 2019 but the PCI Express 6.0 specs are still in process with the last update being November 2020.

Specifications are just mutually agreed upon ways of handling and doing things: These are the pinouts, this I the data spec, here are the power requirements and here is the acceptable boundaries of this specification.

But a specification is not the final step. The next step is to get manufacturers onboard with the spec an gear them up for manufacturing. As of the time of this post, only first demo systems of PCIe 5.0 are being unveiled and introduced to the world. But this is — again — one of the first steps of the process. As explained in this ExtremeTech article from October 2020 discussing a recent demo system using PCIe 5.0:

“The goal of this type of testing is to demonstrate Intel’s commitment to future high-speed interfaces, as well as to create reference platforms for early PCIe 5.0 certification.”

“It’s also a sign that PCIe 5.0 could show up on motherboards in as little as 12 months, though I think 2022 is a bit more likely than late 2021. If Intel launches Rocket Lake at the end of Q1 2021, as is expected, it’s not clear the company would then refresh Alder Lake in the October / November time frame. Typically Intel likes to wait a bit longer than that between product cycles.”

Why does it take so long? Easy: Manufacturing of new chips and related hardware to support new specs is not an overnight thing. It takes time to develop all of that to make it a practical reality.

Also, gearing up to do something like that too soon might be a gamble: What if nobody cares about new PCIe specs to this degree? What if people are perfectly fine with PCIe 3.0? And what do you do with the tons of PCIe 3.0 hardware out there?

Remember, hardware manufacturing is a business: Why would a company sit on already manufactured PCIe 3.0 hardware just to rush PCIe 5.0 and — eventually — PCIe 6.0 systems into existence? What financial gain do they get by doing that?

So while new specs always seem cool, they typically do not show up right away after a set of specs is standardized.

tracking – Using Hotjar to better understand user’s journey of a payment flow

my client is asking to integrate Hotjar to have a better idea of user’s behaviour during payment process flow (Account creation, Payment information, Review, Confirmation). Although, I have some concerns about the tracking of such tool regarding the credit card information. I couldn’t find on the subject. What are your thoughts ?

I am reading Automata and Computability by Dexter C. Kozen and I am in the first chapter entitled Strings and Sets.

If we have a set $$A=$${$$ab,b$$} do we get to assume that the null string $$ε$$ is also a member of that set? If we have another set $$B=$${$$ε$$}, does $$A∩B$$={$$ε$$} or does $$A∩B=∅$$?

On a related note, I am having trouble understanding the meaning of a little chunk in the textbook. What does “family of set indexed by another set I” mean? What does the set I consist of here? I am very confused by the notation as well. Anything you can do to help me understand the excerpt below is appreciated.

Using the slot does not ‘expend’ nor ‘consume’ the spell

Note: This answer has quite a bit of the rules text cited with the intention of helping a new DM better translate the Players Handbook (PHB) text into a ‘how to apply this in your game’ since the game is being played by new players+new DM.

Spell Slots

Regardless of how many spells a caster knows or prepares, he or she
can cast only a limited number of spells before resting (PHB Chapter 10)

What you described as your understanding is how it worked in older editions of the game. In D&D 5th edition spell casting is more flexible.

A spell slot powers anyknown or prepared spell of its level.

You ask about the druid and the sorcerer. Their mechanics are slightly different. One is a prepared spells caster, one is a known spells caster.

Known and Prepared Spells

Before a spellcaster can use a spell, he or she must have the spell
firmly fixed in mind…Members of a few classes have a limited list of spells they know that are always fixed in mind. {Sorcerers are one of those classes}.

Other spellcasters, such as clerics and wizards, {and druids} undergo
a process of preparing spells…In every case, the number of spells a caster can have fixed in mind at any given time depends on the character’s level. (PHB, CH 10)

Druids prepare spells, and sorcerers know spells. This is a mechanical game distinction. (Ch 10 PHB, Spellcasting, and CH 3 in the Spellcasting sections for Druid and for Sorcerer class descriptions).

1. Sorcerer: Spells Known of 1st Level and Higher

The Spells Known column of the Sorcerer table shows when you learn more sorcerer spells of your choice. Each of these spells must be of a level for which you have spell slots. For instance, when you reach 3rd level in this class, you can learn one new spell of 1st or 2nd level…when you gain a level in this class, you can choose one of the sorcerer spells you know and replace it with another spell from the sorcerer spell list, which also must be of a level for which you have spell slots. (PHB, CH 3, Sorcerer)

2. Druid: Preparing and Casting Spells

The Druid table shows how many spell slots you have to cast your druid spells of 1st level and higher. To cast one of these druid spells, you must expend a slot of the spell’s level or higher. You regain all expended spell slots when you finish a long rest.
You prepare the list of druid spells that are available for you to
cast, choosing from the druid spell list. When you do so, choose a
number of druid spells equal to your Wisdom modifier + your druid
level (minimum of one spell). The spells must be of a level for which
you have spell slots.

For example, if you are a 3rd-level druid, you have four 1st-level and two 2nd-level spell slots. With a Wisdom of 16, your list of prepared spells can include six spells of 1st or 2nd level, in any combination. Casting the spell doesn’t remove it from your list of prepared spells.

You can also change your list of prepared spells when you finish a
long rest. Preparing a new list of druid spells requires time spent in prayer and meditation: at least 1 minute per spell level for each
spell on your list. (PHB, Ch 3, Druid)

Each day players “prepare” list of spells for that day, and place one
in each spell slot to use later.

The Druid prepares, the Sorcerer does not.

Is this correct?

Not for this edition of the game. Any slot can be used to apply any known or prepared spell of the appropriate level.

Can each spell be used only once per day?

No. That is how it worked in AD&D, Basic D&D, in Original D&D, and in 3rd edition D&D. In this edition, that has changed. The character prepares or knows a number of spells of the same level, and any slot can be used to cast any spell of the appropriate level.

Examples:

1. a level 1 Druid prepares both Entangle and Healing Word, and has
two spell slots at first level. The druid can cast Entangle twice,
or, Healing Word twice, or, each one once – before running out of spell slots for that adventuring day.
2. A sorcerer has chosen Sleep and Magic Missile at first level and has two spell slots at first level. They can cast Sleep twice, or, Magic Missile twice, or, each one once – before running out of slots for that adventuring day.

Do spells come from all spells for that level or only known spells?

That depends on the character’s class.

1. The Druid has to pick which ones to prepare after each long rest
from any spell on the list for their class and level.
2. The Sorcerer, once a spell is known/chosen, always has it ready to
cast (Known spells is the in game term for this). They can only
change that after they increase in level.

If it comes from “known spells”, how does a druid or sorcerer add to
their list of “known spells”?

The druid can prepare any spells from the druid list that their level allows them to cast.

The Sorcerer has to make a choice at character generation, and at each level up.

Example: a druid of level 2 with a Wisdom of 16 prepares their level + Wisdom Bonus spells each day at the completion of a long rest. They have the whole spell list to choose from, but must decide which five to choose. (They can always choose to have prepared what they had done ono the previous day). The bonus spells from their circle (Circle of the Land) are always prepared, and don’t count against the above slot formula.

The Sorcerer at level 2 had two spells already known from level 1, chosen from the Sorcerer list. At level two, they get to pick one new spell that they already know, and can replace one of the previous ones that they knew – but perhaps they found that they don’t like as much as they thought they would.

The spell slot, which recharges after a long rest, can be used for any of the spells with that same level.
Spell Slots (PHB, Ch 10)

When a character casts a spell, he or she expends a slot of that
spell’s level or higher, effectively “filling” a slot with the spell.
{snip}. So when Umara{a third level sorcerer for example} casts magic missile, a 1st-level spell, she spends one of her four 1st-level slots and has three remaining.

Note that the spell slot is what is expended, not the spell. The spell remains in the caster’s mind; to cast it requires the slot.

Finishing a long rest restores any expended spell slots (see chapter 8
for the rules on resting)

unity – How can it be that if I click on rawimage it’s getting the right file name from the hard disk ? I don’t understand it

In this script once only I’m getting the all the files from the hard disk type png images.

``````using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.UI;

public class SavedGamesSlots : MonoBehaviour
{
public GameObject saveSlotPrefab;
public float gap;

private Transform slots;

// Start is called before the first frame update
void Start()
{
imagesToLoad = Directory.GetFiles(Application.dataPath + "/screenshots", "*.png");
slots = GameObject.FindGameObjectWithTag("Slots Content").transform;

for (int i = 0; i < imagesToLoad.Length; i++)
{
var go = Instantiate(saveSlotPrefab);
go.transform.SetParent(slots);

Texture2D thisTexture = new Texture2D(100, 100);
MouseHover.savedGameFName = fileName;
thisTexture.name = fileName;
go.GetComponent<RawImage>().texture = thisTexture;
}
}

// Update is called once per frame
void Update()
{

}
}
``````

At this line I’m doing reference from another script to a public static variable :

``````MouseHover.savedGameFName = fileName;
``````

Then in the MoueHover script that I’m using it calling it from each raw image event trigger I’m using also the mouse button down :

``````using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;

public class MouseHover : MonoBehaviour
{
public RawImagePixelsChange rawImagePixelsChange;
public static string savedGameFName;
public static string folder;

public void OnHover()
{
Debug.Log("Enter");
rawImagePixelsChange.modifyPixels(0.3f);
PlaySoundEffect();
}
public void OnHoverExit()
{
Debug.Log("Exit");
rawImagePixelsChange.restorePixels();
}

private void Update()
{
{
if (Input.GetMouseButtonDown(0))
{
folder = Path.GetDirectoryName(savedGameFName);
}
}
}

private void PlaySoundEffect()
{
transform.GetComponent<AudioSource>().Play();
}
}
``````

At this line :

``````if (Input.GetMouseButtonDown(0))
``````

After clicking the mouse left button inside I’m using a break point on one of the lines and I see that the variable savedGameFName contains the correct clicked raw image full directory with the file name for example :

d://screenshots//screen_1920x1080_2021-01-26_18-56-46.png

but how does it know to assign to the variable savedGameFName the correct file name of the clicked raw image ? It’s not a list or something it’s just public static string variable. and the only other using is in the first script when running the game once first time.

I don’t understand it.

It’s working fine !!! but I don’t understand how.