discrete geometry – how many small points can be drawn in an area where no three are "collinear"?

When people draw dots on paper, these are actually not dots, but small areas that are filled with ink. Suppose each point has a fixed radius disk shape $ r << 1 $ and must be drawn within (1) a square area with side length $ 1 $; (2) a circular area with radius $ 1 $, How many points can be drawn so that no three are collinear? Three points are collinear if one of them intersects with the strip determined by the other two at more than one point. (I think it's equivalent to: There's a line that cuts all points at more than one point.)

Comment. I have been working on an Olympic problem that requires it $ 100 Points in a circle without three being collinear. With normal pen and paper, it is a very difficult task. So I came up with this problem and hopefully someone has previously encountered similar problems or can provide an algorithm to estimate the limit when $ r $ is small.

parallels desktop – No window can be drawn in Catalina Beta

I'm using macOS Catalina 10.15 beta in a virtual machine running Parallels Desktop for Mac version 15.0.0.

I installed the beta on Mojave, which worked well within the VM. Unfortunately, after installing Catalina Beta, I can not pull windows anymore.

When I click and drag the title bar of a window, the window moves a few pixels and stops. If I repeat it, I can barely make any progress by gradually shifting the window a few pixels at a time. Obviously, it's not practical to move some pixels at once, which makes Catalina Beta unusable.

This issue affects windows in all apps: the Finder, the About This Mac window, the Feedback Wizard, and so on.

Any workarounds or fixes?

Percent calculator with drawn overlay in C #

I would like to create a program that calculates the percentage of a selected screen size. For example, I want the user to be able to draw a box about anything he wants (possibly using an overlay?), Such as a camera image, and then type in what percentage of the screen size you want to see. So, if you enter 20%, a line or field is drawn vertically that is 20% of the currently drawn field vertically. This line would only have to be movable within the drawn box.

I would like to do this in C #, preferably with a small GUI for the user to enter a percentage. I am not looking for a complete solution to this problem. It is a learning project for me. I just want to give some guidance on where to look for resources and what to do to get a good start.

I have not made a small painting as a small guideline not the best work of art, but should give a hint.

View post on imgur.com

Many thanks

Christian

Touchscreen – How do you undo drawn lines in Windows 8 Sticky Notes?

For example, Windows 8 sticky notes have a touch screen feature. If you use a touch screen, you can draw things in a note window. I never use this feature, but it often happened to me that I accidentally pulled something in. However, there is no (obvious) way to REMOVE or undo the drawings – Ctrl + Z only affects the text, the context menu does not show anything, the drawings do not affect the written text. The only option I've found so far is Ctrl + A, create a new sticky, copy it and delete the old one. Bad design or did I miss something?

java – Rotate the circle drawn on the canvas so that it is marked by touch

I'm trying to make my app display a circle that the user can turn by touching and dragging the circle to some degree. Suppose the circle can not be rotated more than 60 degrees.

I extended the View class to create my custom view.
I drew a circle on my canvas with the drawCircle () method.
To rotate it, I know that I need to make a canvas.rotate (), but I'm not sure how to fix the center.
How do I measure this angle?
What do I turn over?

public class DrawingView extends View {

Paint color;
Canvas canvas;
int originalX = 100;
int original Y = 50;
int radius = 75;
// ... some code ...
// Paint, canvas initialized in constructors

@Run over
protected void onDraw (Canvas Canvas) {
canvas.drawCircle (originalX, originalY, radius, color);
// a little more code ...
}

@Run over
public boolean onTouchEvent (MotionEvent event) {
int x = (int) event.getX ();
int y = (int) event.getY ();
case MotionEvent.ACTION_DOWN:
// Determine if touching in my circle
break;
case MotionEvent.ACTION_MOVE:
double tx = x - originalX;
double ty = y - originalY;
double length = Math.sqrt (tx * tx + ty * ty);
double angle = Math.acos (radius / length);
Double degree = (angle * 180) /Math.PI;
System.out.println ("Degrees" + (angle * 180) /Math.PI);
break;
}
}

The displayed code does not seem to give me a correct value.
For example, if I tap and drag until the end of the screen, a value of 70 degrees is displayed. I do not think that I calculate the angle correctly, but I have no idea how to do it.

Best web design services

In today's fast-paced world, the website is the frontline substance of your organization. Customers experience this site, which is all the more interesting and user-friendly when compared to the outdated and boring website. In the event that customers or customers are not drawn to your website, they do not stick to it. To make your website seductively and externally attractive to customers, you need the services of a professional and reliable IT design company.

There are many IT design and development companies in the industry that provide high quality web design services. The professional management of a celebrated design organization can lead to positive results. Web development and design can be easy for customers, but they involve a lot of arrangement and endeavor to achieve the desired results. Before selecting an organization, examine the portfolio of the organization. In this way, you can easily check the previous subtleties, work specialties, etc. of the organization. You can get some information about their skills in the realistic design of programs like Java, Flash and Adobe etc.

,

Neural Networks – Recognizing emotion from machine vision through a drawn face?

Can someone tell me how to modify this code to recognize more facial expressions? … Thanks for your help.

Manipulate[
 eyeMat = {{1/(eyeRadius - pupilRadius/2), 0}, {0, 
    1/(0.15 + eyes - pupilRadius/2)}};
 If[Norm[eyeMat.(pup - eyeCenter[[left]])]<1,
pupNow = pup - eyeCenter[[left]];];
If[Norm[eyeMat.(pup - eyeCenter[[right]])] < 1, 
  pupNow = pup - eyeCenter[[right]];];
 Column[{g = 
    Graphics[{face, eye[left, eyes], eye[right, eyes], Blue, 
      pupil[left, pupNow, eyes], pupil[right, pupNow, eyes], Black, 
      browDraw[left, brows, eyes], browDraw[right, brows, eyes], 
      Inset[mouthDraw[mouth], {0, -0.5}]}, ImageSize -> {400, 450}],
Classify["FacialExpression", g]}],
{{brows, {-Pi / 20, 0}}, {-0,6, 0}, {0,6, 0,15},
ControlPlacement -> Left}, {{eyes, 0}, -0.07, 0.07,
ControlPlacement -> Links,
ControlType -> VerticalSlider}, {{mouth, 0.15}, -0.401, 0.4, 0.01,
ControlPlacement -> Links,
ControlType -> VerticalSlider}, {{pup, {0, 0}}, Locator,
Appearance -> None},
Initialization:> (face = circle[{0, 0}, {1, 1.2}]; pupNow = {0, 0};
left = 1; right = 2;
eye radius = 0.18; eyeCenter = {{-0.4, 0.15}, {0.4, 0.15}};
pupilRadius = 0.09;
browUp = 0.25; Forehead = 0.2; browAng = Pi / 20;
eye[side_, eccen_] : = {Black,
circle[eyeCenter[[side]]{eyeRadius + 0.05, eyeRadius + eccen}]};
student[side_, pup_, 
     eccen_] : = {Disk[eyeCenter[[side]]+ Puppy + {0, puppy[[2]]Eccen}
Pupil radius + Max[0, eccen/3]]black
plate[eyeCenter[[side]]+ Puppy + {0, puppy[[2]]eccen}, 0,03]};
browDraw[side_, {browAng_, browLift_}, eccen_] : =
Rotate[{Thickness[0.01],
line[{{eyeCenter[[side]]+ {-browW,
browLift + browUp + 0.5 eccen}
Eye center[[side]]+ {browW,
browLift + browUp + 0.5 eccen}}}]}, 2 (Page - 1.5) browAng];
mouthDraw[s_] : =
ParametricPlot[{Cos[u]-s Sin[u]}, {u, Pi / 6, Pi - Pi / 6},
Axes -> False, PlotStyle -> {Red, Thick[0.02]},
PlotRange -> All])]

I want me to experience more emotions than neutral, fear and sadness.

c ++ – Fill a hand with random cards that have not been drawn yet – Monte Carlo

I would like to know if there is a more efficient way to speed up the following code. This function serves to fill a poker hand with the remaining one
Mersenne Twister maps for a Monte Carlo simulation.

void HandEvaluator :: RandomFill (std :: vector <std :: shared_ptr.)> & _Set, std :: vector <std :: shared_ptr> & _Dead, unsigned int _Target) {
// Add the cards currently in Set as dead cards
for (auto const & CardInSet: _Set)
{
if (CardInSet == nullptr)
break;

_Dead.push_back (CardInSet);
}

bool IsDead;
unsigned int RequiredAmt = _Target - _Set.size ();

unsigned int CardIndex = 0;
std :: uniform_int_distribution CardsDistribution (0, 51);

for (unsigned int index = 0, index < RequiredAmt; Index++)
    {
        while (true)
        {
            IsDead = false;
            CardIndex = CardsDistribution(MTGenerator);

            for (auto const& Dead : _Dead)
            {
                if (ReferenceDeck[CardIndex]->GetRank () == Dead-> GetRank () && ReferenceDeck[CardIndex]-> GetSuit () == Dead-> GetSuit ())
{
IsDead = true;
break;
}
}

if (! IsDead)
{
_Set.push_back (ReferenceDeck[CardIndex]);
break;
}
}
}
}

The Visual Studio Profiler had identified this line

                CardIndex = CardsDistribution (MTGenerator);

is the main responsible behind the high computing time. Is not Mersenne Twister itself intended for a Monte Carlo simulation and instead should another PRNG be used? Or are there some inefficient lines that I missed?

opengl – How are pictures drawn at a low level?

I've read the basics of computer graphics – Shirley, Marschner, but it seems like the book skips this (or has not been discussed yet, and I'm impatient and curious about it). I ask this question in connection with games, videos, pictures etc.

To simplify matters, let's say we're working on a 10×10 square pixel on the screen. Suppose we have a 10×10 array with the data of the color of each pixel and also assume that the colors in the array are all possible colors of the screen we are working with.

1, How is this picture drawn on the screen of a monitor? Do the displayed pixels match the actual array, or can there be differences? Basically, I ask what the map looks like that maps that data to the ad. I should also note that I am not really looking for an explanation of how the actual monitor hardware, etc. works.

2, Let's say we have some of these arrays and plan to display them one at a time to create a kind of animation. How do we do this in the context of games, videos, etc.? More specifically, is each of the arrays displayed by the method described in (1)?

I'm asking for (2) because I'm not sure if there's any meaningful way to tweak it in a sense? For example, If the following array in a particular area of ​​the square does not change much, say the top left corner. Maybe we can somehow ignore this upper left corner and instead use that energy for other calculations? If we can assure that we are, to some extent, often enough, this may seem useful. I do not even know if ignoring the upper left corner is anything that saves some processing power.

3, Is it even how pictures are displayed? Do we have a sort of arrangement of the colors that we want to display, and then display them on the screen? That seems to be the natural way, and I can not imagine another way, but I would like to know if there is another way.

4, Are there any interesting facts about these concepts in terms of animation and games? I would be interested in more information on this topic.

I'm sorry if these questions are not appropriate for this section. I ask that again specifically in connection with video games and animations.