+Beta ).
To the Cartesian coordinate system, the point after rotation is changed to (cos (α +Beta) * r, sin (α +Beta) * r ).
Then use the formula:
Cos (α + β) = cos α cos β-sin α sin β
Sin (α + β) = sin α cos β + cos α sin β
A
By doing this, I also confirmed that GDI + can directly display transparent images in PNG, GIF, and TIF formats.
// Red and green rotate around blue (R is radian) colormatrix: tcolormatrix = (COS (R), sin (R), 0.0, 0.0, 0.0 ), (-sin (R), cos (R), 0.0, 0.0, 0.0), (0.0, 0.0, 1.0, 0.0, 0.0), (0.0, 0.0, 0.0, 1.0, 0.0), (0.0, 0.0, 0.0, 0.0, 1.0); // rotate green and blue (R is a radian) colormatrix: tcolormatr
function must use the dot Multiplication operation because the two are vectors.
Example 52 plot a curve
This is a curve equation given in the form of parameters. As long as the parameter vectors are given and then the X and Y vectors are obtained respectively, the curve can be output:
> T =-Pi: PI/100: PI;
> X = T. * Cos (3 * t );
> Y = T. * sin (T). * sin (t );
> Plot (x, y)
After the program is executed, open a graphical window and draw the follow
Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 3790
Typical short circuit problem. It indicates that after learning and checking the set in the morning, I learned the shortest short circuit because of the most short-circuit exercise, it means that he learned the code in the algorithm competition book of Liu rujia, and the guidance of the Senior Student Of the pigeon, finally wrote the first shortest circuit (orz...) in my ACM career ...)
The typical Dijkstra algorithm uses the DIS and
the line and press enter to wrap the line. For example:
S = 1-1/2 + 1/3 + 1/4 + sin (3 * x * y)-cos (x )...
-Over 1/8 + 1/10 + 1/20
:
Control keys and direction keys used for command line editing
Press ''to display the command line you just typed;
Press the ''key repeatedly to call back all the previously typed command lines;
''Key to move the cursor;
There are also 'home', 'end', 'esc 'keys, and so on. 'esc' to clear a row.
Variable
It must
Because of the needs of the experiment report, we have matlab plotting.
X = 0: pi/1000:2 * pi; y1 = sin (2 * x); y2 = 2 * cos (2 * x); % output image plot (x, y1, 'r-', x, y2,' B -- '); title ('plot of f (x) = sin (2x) and its derivative '); % set the xlabel ('x') for the X and Y coordinates; ylabel ('y'); % create the legend ('f (x) = sin (2x )', 'd/dx f (x) ') % display grid on;
1. x = 0: pi/1000:2 * pi. It indicates that the x coordinate starts f
How to determine the scale Size of the horizontal and vertical coordinates in the drawing command (self-defined range)How to draw multiple curves in one coordinate and use different colors.Hope to get the answer. Thank you !!!!!!!!!!!Help plotHelp axisAxis ('xlabel', 'ylabel ')A1 = plot ();Hlevels onA2 = plot ();Legend ([a1 a2], 'figure 1 name', 'figure 2 name ')Hold offMoreX1 =-Pi: PI/12: PI;X2 =-Pi: PI/12: PI;Y1 = sin (X1 );Y2 = cos (X2 );Plot (x1,
QoS learning notes marking: 1. the class-map.class-map defined [match-all/match-any] {map-name} is not typed by default. define the match command matchmatch access-group {NO} match input-interface {interface} match class-map {map-name} class-map nested match source-address {mac-address} source mac address match destination-address {mac-address} destination mac address match vlan {vlan-ID} match ip dscp {DSCP} match ip precedencc {precedence} match protocol {protocol} Based on NBARRouter (config)
latitude and longitude of 1th A is (Lona, LatA), the latitude and longitude of 2nd B is (LONB, LATB), according to the datum of 0 degrees longitude, the positive value of longitude (longitude), the longitude is negative (-longitude), north latitude takes 90-latitude value (90- Latitude), 90+ latitude value (90+latitude), the two points after the above treatment are counted as (Mlona, Mlata) and (Mlonb, MLATB). Then, according to triangular derivation, we can get the following formula to calcula
There is such an SQL statement. is used to inquire about nearby people. You know how many people are using it. Use the model's Count method.
Here is the SQL statement:
SELECT userid ,username,homeland,headImage,(ACOS(SIN(('.$lat.' * 3.1415) / 180 ) *SIN((latitude * 3.1415) / 180 ) +COS(('.$lat.' * 3.1415) / 180 ) * COS((latitude * 3.1415) / 180 ) *COS(('.$lon.'
(:);%x to 10x1 Matrix Y=ij (:, 2:2:8)%y 25x4 matrix y=y (:);%y to 100x1 matrix sj=[x y];%100x2 Matrix d1=[70,40];% start point sj=[d1;sj; d1];% Add the starting point and end point sj=sj*pi/180;% angle to radians% calculate distance d=zeros (102);% build a 102x102 empty distance matrix, then fill in the corresponding distance%A (r cos X1 cos y1, r sin X1 cos y 1
), latitude values (90+latitude) are 90+, then two points after the above treatment are counted (Mlona, Mlata) and (Mlonb, MLATB). Then according to the triangular derivation, we can get the following formula for calculating the distance of two points:C = sin (mlata) *sin (MLATB) *cos (mlona-mlonb) + cos (mlata) *cos (MLATB)Distance = R*arccos (C) *pi/180Here, R
a vector b and another constant quantity a collinear two opposite projection vector
Let's take a look at the diagram above, obviously, CosA (a=x) about the y-axis symmetry, is even function, so cosA = cos (-a),And because CosA is a periodic function, and the period is 2*PI, there is a cos (a+2*pi) = CosA = cos (-a) = cos
longitude of 1th A is (Lona, LatA), the latitude and longitude of 2nd B is (LONB, LATB), according to the datum of 0 degrees longitude, the positive value of longitude (longitude), the longitude is negative (-longitude), north latitude takes 90-latitude value (90- Latitude), 90+ latitude value (90+latitude), the two points after the above treatment are counted as (Mlona, Mlata) and (Mlonb, MLATB). Then, according to triangular derivation, we can get the following formula to calculate the distan
longitude of 2nd B is (LONB, LATB), according to the datum of 0 degrees longitude, the positive value of longitude (longitude), the longitude is negative (-longitude), north latitude takes 90-latitude value (90- Latitude), 90+ latitude value (90+latitude), the two points after the above treatment are counted as (Mlona, Mlata) and (Mlonb, MLATB). Then, according to triangular derivation, we can get the following formula to calculate the distance of two points:C = sin (mlata) *sin (MLATB) *
2nd B is (LONB, LATB), according to the datum of 0 degrees longitude, the positive value of longitude (longitude), the longitude is negative (-longitude), north latitude takes 90-latitude value (90- Latitude), 90+ latitude value (90+latitude), the two points after the above treatment are counted as (Mlona, Mlata) and (Mlonb, MLATB). Then, according to triangular derivation, we can get the following formula to calculate the distance of two points:C = sin (mlata) *sin (MLATB) *
2nd B is (LONB, LATB), according to the datum of 0 degrees longitude, the positive value of longitude (longitude), the longitude is negative (-longitude), north latitude takes 90-latitude value (90- Latitude), 90+ latitude value (90+latitude), the two points after the above treatment are counted as (Mlona, Mlata) and (Mlonb, MLATB). Then, according to triangular derivation, we can get the following formula to calculate the distance of two points:C = sin (mlata) *sin (MLATB) *
= sin (mlata) *sin (MLATB) *cos (mlona-mlonb) + cos (mlata) *cos (MLATB)Distance = R*arccos (C) *pi/180Here, R and distance units are the same, if the use of 6371.004 km as a radius, then distance is the unit, if you want to use other units, such as mile, also need to do unit conversion, 1-kilometer =0.621371192mileIf the longitude is treated only as positive or
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.