How to draw this ER diagram - database

How to draw ER diagram for this.
Players plays game.game is controlled by refree. Organizer organizes game and pay to refree. Refree is appointed by federation. Assume your own sets on attributes.
I am trying to see what the er diagram is for this question

Related

A data design question of labeling sides in a battle game

I am designing a chess-like game but I believe this question can be extend to all games that have battle.
So my question is, how should I properly label an object as a friend
object or an enemy object in a battle game?
Take chess for example. If player W plays white pieces, then W's opponent, player B, plays black pieces.
For W, all white pieces are friend objects and black pieces are enemy objects, while player B has black friends and white enemies. So here my labeling problem can be simply solved by using colors. When you try to calculate the possible moves of a piece and decide if you can take out a piece, you can basically check if they have the distinct colors.
However, what if two players have the same view? For example, a game can color all friends as black while color all enemies as white, and the players start their games with their pieces all at the bottom. In this sense of speaking, indeed, pieces can be viewed as the attributes of the player. So the coloring of black and white is based on whether a piece has an owner id that is the same as yours.
Here comes a problem:
Although I can decide the color by comparing the ids, what if I want
to know whether a friend piece enters the enemy region?
The definition of enemy region could be the upper part of the board. Since board is not part of the player (while pieces can be), it is not possible to use the previous id solution.
So one possible solution I can think of is to make the board an attribute of the player. However, there are two players, this doubles the data storage because we have actually only one board from an objective perspective. And any moves and further changes on a piece requires operations on two boards, which is also time consuming.
In order not to double the board, I try use to another strategy, which is to use a landscape view. What I mean is that, the data doesn't take sides as players. Players view the board from bottom to top, which is like the portrait view, while data can be viewed from left to right/right to left like what a just referee observes. So the data becomes objective here. But the problem is how to present the objective data in a subjective manner to players? And it is still not easy to know if a piece enters enemy region.
So my question is, how should I properly design the data structure, so that it does not doubles or triples or copies multiple times of the data, and in the meanwhile, it is also easy to know the labels of a public area? In my question, the public area is a chess board, where all pieces should fight on this single board. I call it public because both players can move their pieces to everywhere on the board, and third parties can also see what's going on the board. But the labels of pieces are just subjective attributes, personal private thoughts.
I am not sure if I can properly explain/phrasing my question well so I didn't search for a similar question. Sorry for my laziness. If there is a duplicate question that has been asked, please guide me to it.
---Update---
I think a more clearer question is, let's say I have 3 * 3 board. If I need to move my piece from (1, 2) to (2, 3), then in the perspective of my opponent, the move is not taking place at the same location. It is the opposite. It is from (3, 2) to (2, 1). What is the best way to store this move? Do I have to take one side (subjective) to store it, or is there a neutral/objective way to do this?
The drawback of the subjective way for me is that I need to recalculate the moves for another player to fit his/her view. Using a neutral way might be a life saver.
A general answer without concrete database design - There is data an there are multiple views. There is no need to copy data but to have multiple references to some data (which of course also takes some memory). E. g. a rook is referenced by a square and by a player. Such references may be stored (collection "enemies") or may be calculated on the fly (collection "reachable") depending on runtime/storage design decisions. Also multiple players are just views. On a game move you have to update all static views while dynamic views need none.
For symmetric games there is the possibility not to store the opponents views but generate them by just transforming the whole game into the other players view with every move. Again this is your decision, stored vs. dynamically created.
If I need to move my piece from (1, 2) to (2, 3), then in the perspective of my opponent, the move is not taking place at the same location. It is the opposite. It is from (3, 2) to (2, 1). What is the best way to store this move? Do I have to take one side (subjective) to store it, or is there a neutral/objective way to do this?
Pick one orientation for the board. It doesn't matter which one you pick. This is a neutral/objective way -- neither choice offers any advantage for either player, and the choice doesn't significantly affect the code. Any imbalance you imagine, like that it's better to have (0,0) on your own side, is imaginary.
This is not a "subjective" choice, it is an "arbitrary" choice.

What is the best approach to render 3D model in iOS after facial landmark detection?

I would like to place a hairstyle after facial landmark detection. I'm able to render 2D images properly. I would like to render 3D model. I thought of using SceneKit to render 3D model. I would like to know how Instagram, snapchat and other face filter apps are rendering 3D models. I observe SceneKit coordinate system is different from UIKit coordinate system. I have googled but couldn't find the conversion of coordinate system. Could anyone help. Thanks.
Look for worldUp and simdWorldUp instance properties to understand how ARKit constructs a scene coordinate system based on real-world device motion (also, you can inspect ARConfiguration.WorldAlignment enum).
Please, look at this SO post: Understand coordinate spaces in ARKit for complete info.
And remember, ARAnchor is your best friend when placing 3D object. Click here
for further details.

Turn a model into a specular light source

I have 2 models. One is a vehicle, the other is a series of tube lights. I want to be able to see only the specular reflections of the tube lights on the vehicle.
How can I turn the model of lights into a light source? I tried giving it an emissive material, but then found that an emissive material will not illuminate other figures.

What is the inheritance symbol used in ERD diagram?

I am certain that the inheritance symbol used in ERD diagram is the triangular symbol.
However, I am uncertain of the symbol used in UML diagram that is used to symbolize inheritance.
I have searched on the Internet and I have seen the symbol of a circle icon with an underline below it.
May I know which is the correct inheritance symbol used in UML diagram?
Thank you
Both Generalization as Realization have a triangle endpoint.
The difference is the dotted line for Realization (implementation) vs the solid line for Generalization (inheritance).
In the world of ER modeling, what you are describing is called generalization/specialization. Another phrase is "is-a relationships. For a related wikipedia article, click here and scroll down to UML.
It is triangle for generalization (inheritance), and can be circle (lollipop notation) for realization (implementation of an interface).

Detect road surface in a traffic scene point cloud

I want to analyze a traffic scene. My source data is a point cloud like this one (see images at the bottom of that post). I want to be able to detect objects that are on the road (cars, cyclists etc.). So first of all I need know where the road surface is so that I can remove or ignore these points or simply just run a detection above the surface level.
What are the ways to detect such road surface? The easiest scenario is a straight and flat road - I guess I could try to registrate a simple plane to the approximate position of the surface (I quite surely know it begins just in front of the car) and because the road surface is not a perfect plane I have to allow some tolerance around the plane.
More difficult scenario would be a curvy and wavy (undulated?) road surface that would form some kind of a 3D curve... I will appreciate any inputs.
A relatively simple starting point:
If you can assume that the road surface starts directly in front of the camera then you can use a region growing algorithm to find a region such that the curvature does not change so much within the region (thereby using sharp edges to delineate the region). This would involve calculating the curvature first. This can make a first approximation; there will be issues with occluding objects and other artefacts I am sure.
http://pointclouds.org/documentation/tutorials/region_growing_segmentation.php#region-growing-segmentation
http://pointclouds.org/documentation/tutorials/normal_estimation.php

Resources