Sunday, August 31, 2014

VD EFTP

Added second FTP through Email Rather than Drive in case some members do not wish to use Drive


Private Sub EFTP()
Try
          Dim Smtp_Server As New SmtpClient
          Dim e_mail As New MailMessage()
          Smtp_Server.UseDefaultCredentials = False
          Smtp_Server.Credentials = New Net.NetworkCredential(OBJ.Text, OPER.Text)
          Smtp_Server.Port = 587
          Smtp_Server.EnableSsl = True
          Smtp_Server.Host = "smtp.gmail.com"

          e_mail = New MailMessage()
          e_mail.From = New MailAddress(CMD.Text)
          e_mail.To.Add(txtTo.Text)
          e_mail.Subject = "Email Sending"
          e_mail.IsBodyHtml = False
          e_mail.Body = commander.Text
          Smtp_Server.Send(e_mail)
          MsgBox("Mail Sent")

      Catch error_t As Exception
          MsgBox(error_t.ToString)
      End Try

End Sub

Rotoscoping tools

Real quick set of programs to do rotoscoping for video effects. First a program to fragment the video in to pictures:

import processing.video.*;
Movie move;
int a=0;

void setup() {
  size(200, 200);
  background(0);
  move= new Movie(this, "example.mov");
  move.loop();
}

void draw() {
  image(move, 0, 0);
}

// Called every time a new frame is available to read
void movieEvent(Movie m) {
  m.read();
  save(a+".png");
  a=a+1;
}



And then a rotoscoping tool:

PImage imgC, imgBW;
int a =0;
// Size of transparency area around the mouse
int HALF_HOLE_SIZE = 7;
// Change to true to avoid restoring opacity (ie. paint with background image)
boolean bPersist = true;
int a=0;
void setup()
{
  size(300, 400);
  // Load a color image
  imgC = loadImage("book.jpg");
  // Load a black & white image (the same)
  imgBW = loadImage(a+".png");
  // Indicate we need transparency on this image
  imgBW.format = ARGB;
  noStroke();
  smooth();
  background(255);
}

void draw()
{ 
  // Draw the color image
  image(imgC, 0, 0);
  if (!bPersist)
  {
    // Restore opacity on previous position
    if (mousePressed==false) {
      ChangePixels(pmouseX, pmouseY, true);
    }
  }
  if (mousePressed==true) {
    // Make pixels transparent around the mouse position
    ChangePixels(mouseX, mouseY, false);
    // Draw the altered B&W image
    image(imgBW, 0, 0);
  }
} 

void ChangePixels(int x, int y, boolean bMakeOpaque)
{
  
  if (x <= HALF_HOLE_SIZE || x &rt;= imgBW.width - HALF_HOLE_SIZE) return;
  if (y <= HALF_HOLE_SIZE || y &rt;= imgBW.height - HALF_HOLE_SIZE) return;
  // Get the pixel data
  imgBW.loadPixels();

  for (int i = x - HALF_HOLE_SIZE; i <= x + HALF_HOLE_SIZE; i++)
  {
    for (int j = y - HALF_HOLE_SIZE; j <= y + HALF_HOLE_SIZE; j++)
    {
      if (bMakeOpaque)
      {
        imgBW.pixels[i + j * imgBW.width] |= 0xFF000000;
      }
      else // Make transparent
      {
        imgBW.pixels[i + j * imgBW.width] &= 0x00FFFFFF;
      }
    }
  }
  // Update the modified pixels
  imgBW.updatePixels();
}
void keyPressed() {

  if (key=='s');
  save(a+".png");
  a=a+1;
}



Saturday, August 30, 2014

VD New Features

Also added some new features to VD and Open Bio. Vd now has an FTP through Google Drive
as well as a redesigned GUI:
and a Neumman System(Code which edits itself) and a Fluid Type system which are coming out in the next update. Also the OCTR(Open Cosmic Ray Telescope) will have it's own blog post soon, unforturnately some of the supplies are taking  a while. When that is released there will be full schematics and open software which I shall place in the XOS Industries Software Repo.

Book and Paper


and CMI Paper:
Arxiv

Monday, August 11, 2014

Local Anti-Computer Strategy

Anti-computer strategies generally use long term strategy as the basis for defeating computer. In other words the human player is said to create a grand strategy that is adaptable depending on the computer's strategy. The Local strategy that I am about to present is a short term one. Here is the game for review against the computer with search depth 7(the highest available on this particular version):


Note the use of strategy duality. By being aggressive solely with the queen we trick the computer into proceeding down search paths involving the queen and white aggression. By pulling back this tricks the computer into attempting to attack along the right while trapping the leftmost rook, bishop, and knight. However we quickly eliminate the pawn trap with another pawn and now use our three pieces in the end game. Keeping our king close to the pawns allows us to utilize all our "soldiers" in the pursuing end game as was planned. Now we can play rather carelessly as we out number him. Note that the trading is crucial as most computer strategies and many human strategies involve saving the rooks for the end in order to trap the king. As long as we eliminate one when the opportunity arises as we did, and aggressively trade pieces to eliminate most of the computer's flank, either right or left but remember to keep the opposite closed for your pieces. Here is a graph showing the computer's estimation of who has the advantage. Note the significant jump between the early and last moves. Also note how the computer is convinced of its own ability to win at Nh3, this is part of the strategy, as the Pseudo random erratic moves that we make greatly "confuse" the search algorithm.


PGN Contents:

1.e3 d6 2.Nf3 Bg4 3.Bb5+ c6 4.Bc4 d5 5.Bd3 Nd7 6.e4 dxe4 7.Bxe4 Ngf6 8.Qe2 Nxe4 9.Qxe4 f5 10.Qf4 e6 11.Qa4 b5 12.Qa6 Nc5 13.Qa3 b4 14.Qe3 Bd6 15.h3 Bxf3 16.gxf3 Qf6 17.Rg1 Qh4 18.Rg3 Bf4 19.Qxc5 Kf7 20.Rg1 Qf6 21.Qxc6 Rab8 22.Qd7+ Kg8 23.Qxa7 Rd8 24.c3 Bh2 25.Kf1 Bxg1 26.Kxg1 Qg5+ 27.Kf1 Qh4 28.Qe3 Qxh3+ 29.Ke2 Qh4 30.d4 Qe7 31.Qd3 g5 32.Qa6 e5 33.dxe5 Qxe5+ 34.Kf1 g4 35.Qe2 Qd5 36.cxb4 gxf3 37.Qd2 Qc4+ 38.Ke1 Rxd2 39.Kxd2 Qxb4+ 40.Nc3 Qd4+ 41.Kc2 Qxf2+ 42.Bd2 Qg2 43.Re1 Kf7 44.a4 f2 45.Re2 Qh1 46.Rxf2 Kg6 47.b4 Qa1 48.Kb3 Rc8 49.Rg2+ Kf6 50.Rg5 Qxc3+ 51.Bxc3+ Kxg5 52.b5 Kf4 53.b6 Ke4 54.a5 Rb8 55.Kc4 Rc8+ 56.Kb5 Kd5 57.b7 Rc7 58.b8=Q Rxc3 59.Qg8+ Kd6 60.Qxh7 Kd5 61.Qxf5+ Kd4 62.Qf6+ Kd3 63.Qxc3+ Kxc3 64.a6 Kd4 65.a7 Ke3 66.a8=Q Kd4 67.Qf3 Ke5 68.Kc4 Ke6 69.Kd4 Kd7 70.Qd5+ Ke8 71.Qe6+ Kd8 72.Qf7 Kc8 73.Kc5 Kd8 74.Kb6 Kc8 75.Qe8#

Tuesday, August 5, 2014

Human Thermal Mapping Software

Created a quick thermal mapping software prototype which could be modified from the source for any type of mapping process. Anyway here is a picture of it from inside the program mapping temperature for humans.


The Windows executable is available in the Repository

Monday, August 4, 2014

Laser Detection Using Oscilloscope



Have been working on the Actual cloud chamber implementation, the build requires nuclear sheilding for the implementation I wish to use so I am try to secure that material. Began working on two new websites one for the VD Language and another for biolistics from another project, it went from a post into a fll blown website. Both are still under development. Published article at Arxiv and it is under review at Elsevier, a new paper is in the works that I will loink to or post here as well.