我尝试在Maple18上绘制3D图形。我在同一平面上绘制了2张图,我希望它能显示所有截距。如果可能的话,我实际上只想要整体拦截,但我不知道命令。 这是我希望它显示拦截的图表
plot3d([x ^ 2,3 ^ 6 * z-432],x = -50 .. 50,z = 0 .. 20)
答案 0 :(得分:0)
如果您只想显示两个表达式的交集,可以尝试使用plots:-intersectplot命令。以下将显示两个表面的交点:
namespace Picker
{
class Program
{
static bool doContinue = true;
static double[] numbers = { 4, 12, 28, 60, 124, 252, 508, 1020, 2044, 4092, 4120, 4176, 4288, 4512, 4960, 5856, 7648, 11232, 18400, 32736 };
static string Pick()
{
double rnd = new Random().NextDouble() * 32736;
byte type = 0;
for (byte i = 0; i < 20; i++) {
if (rnd <= numbers[i])
{
type = i;
break;
}
}
string reverString = "";
if (type < 10)
{
reverString = " Reverse";
}
return "T" + (10 - (type % 10)).ToString() + reverString;
}
static void Main(string[] args)
{
while (doContinue)
{
Console.WriteLine(Pick());
Thread.Sleep(2);
Console.WriteLine(Pick());
Thread.Sleep(2);
Console.WriteLine(Pick());
Thread.Sleep(2);
Console.ReadLine();
}
}
}
}
如果您想将其叠加在原始情节上:
int dtls1_process_heartbeat(SSL *s)
{
unsigned char *p = &s->s3->rrec.data[0], *pl;
unsigned short hbtype;
unsigned int payload;
unsigned int padding = 16; /* Use minimum padding */
/* Read type and payload length first */
hbtype = *p++;
n2s(p, payload);
pl = p;
if (s->msg_callback)
s->msg_callback(0, s->version, TLS1_RT_HEARTBEAT,
&s->s3->rrec.data[0], s->s3->rrec.length,
s, s->msg_callback_arg);
if (hbtype == TLS1_HB_REQUEST)
{
unsigned char *buffer, *bp;
int r;
/* Allocate memory for the response, size is 1 byte
* message type, plus 2 bytes payload length, plus
* payload, plus padding
*/
buffer = OPENSSL_malloc(1 + 2 + payload + padding);
bp = buffer;
/* Enter response type, length and copy payload */
*bp++ = TLS1_HB_RESPONSE;
s2n(payload, bp);
/*@ slice pragma stmt; */
memcpy(bp, pl, payload);
bp += payload;
/* Random padding */
RAND_pseudo_bytes(bp, padding);
r = dtls1_write_bytes(s, TLS1_RT_HEARTBEAT, buffer, 3 + payload + padding);
if (r >= 0 && s->msg_callback)
s->msg_callback(1, s->version, TLS1_RT_HEARTBEAT,
buffer, 3 + payload + padding,
s, s->msg_callback_arg);
OPENSSL_free(buffer);
if (r < 0)
return r;
}
else if (hbtype == TLS1_HB_RESPONSE)
{
unsigned int seq;
/* We only send sequence numbers (2 bytes unsigned int),
* and 16 random bytes, so we just try to read the
* sequence number */
n2s(pl, seq);
if (payload == 18 && seq == s->tlsext_hb_seq)
{
dtls1_stop_timer(s);
s->tlsext_hb_seq++;
s->tlsext_hb_pending = 0;
}
}
return 0;
}